@messaia/cdk 13.3.0-rc21 → 13.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1946,6 +1946,11 @@ class BaseComponent {
1946
1946
  * If true, set url hash
1947
1947
  */
1948
1948
  this.setUrlHash = true;
1949
+ /**
1950
+ * Checks if the user seleceted any text in the document
1951
+ * @returns
1952
+ */
1953
+ this.isTextSelected = () => window?.getSelection()?.toString()?.length > 0;
1949
1954
  this.titleService = this.getService(Title);
1950
1955
  this.dialogService = this.getService(VdDialogService);
1951
1956
  this.media = this.getService(VdMediaService);
@@ -4556,7 +4561,9 @@ class GenericListComponent extends BaseComponent {
4556
4561
  * @param item The id of the item
4557
4562
  */
4558
4563
  edit(item) {
4559
- this.router.navigate([`${this.router.url}/edit/${item.id}`]);
4564
+ if (!this.isTextSelected()) {
4565
+ this.router.navigate([`${this.router.url}/edit/${item.id}`]);
4566
+ }
4560
4567
  }
4561
4568
  /**
4562
4569
  * Patches the entity