From: Vincent Vanwaelscappel Date: Thu, 4 May 2023 14:59:06 +0000 (+0200) Subject: wait #5894 @0.5 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=9cc87a8301276ef1f0de19c92eb10278db6efffa;p=fluidbook-toolbox.git wait #5894 @0.5 --- diff --git a/resources/linkeditor/js/linkeditor.js b/resources/linkeditor/js/linkeditor.js index d39327079..8c9a586d8 100644 --- a/resources/linkeditor/js/linkeditor.js +++ b/resources/linkeditor/js/linkeditor.js @@ -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) {