]> _ Git - fluidbook-toolbox.git/commitdiff
wait #5923 @1
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 9 May 2023 17:10:47 +0000 (19:10 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 9 May 2023 17:10:47 +0000 (19:10 +0200)
resources/linkeditor/js/linkeditor.js
resources/linkeditor/js/linkeditor.links.js
resources/linkeditor/js/linkeditor.utils.js

index 8c9a586d8a72b5afabbcf3e8e84868b36f16ec5b..0bc0178e81a9c7c8619ed4b8866ced0d2717c8a6 100644 (file)
@@ -175,7 +175,6 @@ LinkEditor.prototype = {
             }
             if (e.keyCode == 16) {
                 $("#linkeditor-main").addClass('selection');
-
             } else if (e.keyCode == 32) {
                 if (!$this.mobileFirst) {
                     $("#linkeditor-main").addClass('grab');
@@ -189,9 +188,6 @@ LinkEditor.prototype = {
         });
 
         $(window).on('keyup', function (e) {
-            if (this.linkeditor.utils.isfocusOnFormItem()) {
-                return true;
-            }
             if (e.keyCode == 16) {
                 $("#linkeditor-main").removeClass('selection');
             } else if (e.keyCode == 32) {
@@ -201,6 +197,9 @@ LinkEditor.prototype = {
 
             }
             $this.rulers.moveRuler();
+            if (this.linkeditor.utils.isfocusOnFormItem()) {
+                return true;
+            }
             return false;
         });
 
index c2aaaeb5da20639b03d42c1e0a2878936fe07aa6..f67160211b72ad2537d602602ae48e977122f11b 100644 (file)
@@ -409,7 +409,6 @@ LinkeditorLinks.prototype = {
     },
 
     copySelectionToClipboard: function (cut) {
-
         var selection = this.getCurrentSelection();
         if (selection.length === 0) {
             return;
@@ -1190,6 +1189,7 @@ LinkeditorLinks.prototype = {
             rect.width = this.linkeditor.pw + margin * 2;
         }
         link.attr('fb-left', rect.x).attr('fb-top', rect.y).attr('fb-width', rect.width).attr('fb-height', rect.height);
+        this.updateSelectionData(['left', 'top', 'width', 'height']);
         this.linkeditor.hasChanged();
     },
 
index 26d265056dc46a405d831ece6ab1e5e3f204c0cb..0b4460483a765979082eb474b55318a59725d27a 100644 (file)
@@ -143,7 +143,7 @@ LinkeditorUtils.prototype = {
             r2.bottom < r1.top);
     },
     isfocusOnFormItem: function () {
-        return $(document.activeElement).is('input,textarea,select');
+        return $(document.activeElement).is('input[type="text"],input[type="email"],input[type="number"],input[type="phone"],textarea,select');
     }
 };