]> _ Git - fluidbook-toolbox.git/commitdiff
wait #5894 @0.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 4 May 2023 14:59:06 +0000 (16:59 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 4 May 2023 14:59:06 +0000 (16:59 +0200)
resources/linkeditor/js/linkeditor.js

index d3932707914c505ffc9143b1da52ea48950e903b..8c9a586d8a72b5afabbcf3e8e84868b36f16ec5b 100644 (file)
@@ -170,30 +170,38 @@ LinkEditor.prototype = {
 
 
         $(window).on('keydown', function (e) {
+            if (this.linkeditor.utils.isfocusOnFormItem()) {
+                return true;
+            }
             if (e.keyCode == 16) {
                 $("#linkeditor-main").addClass('selection');
+
             } else if (e.keyCode == 32) {
                 if (!$this.mobileFirst) {
                     $("#linkeditor-main").addClass('grab');
                 }
             } else if (e.keyCode == 18) {
                 $("#linkeditor-main").addClass('duplicate');
-                return false;
+
             }
             $this.rulers.moveRuler();
+            return false;
         });
 
-        // Disable scroll by spacebar
         $(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) {
                 $this.zoom.resetZoomDrag();
             } else if (e.keyCode == 18) {
                 $("#linkeditor-main").removeClass('duplicate');
-                return false;
+
             }
             $this.rulers.moveRuler();
+            return false;
         });
 
         $(document).on('mousedown', "#linkeditor-editor", function (e) {