From: Vincent Vanwaelscappel Date: Tue, 9 May 2023 17:10:47 +0000 (+0200) Subject: wait #5923 @1 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=038b18e137e615253b5e2c412af2a4453ce53128;p=fluidbook-toolbox.git wait #5923 @1 --- diff --git a/resources/linkeditor/js/linkeditor.js b/resources/linkeditor/js/linkeditor.js index 8c9a586d8..0bc0178e8 100644 --- a/resources/linkeditor/js/linkeditor.js +++ b/resources/linkeditor/js/linkeditor.js @@ -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; }); diff --git a/resources/linkeditor/js/linkeditor.links.js b/resources/linkeditor/js/linkeditor.links.js index c2aaaeb5d..f67160211 100644 --- a/resources/linkeditor/js/linkeditor.links.js +++ b/resources/linkeditor/js/linkeditor.links.js @@ -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(); }, diff --git a/resources/linkeditor/js/linkeditor.utils.js b/resources/linkeditor/js/linkeditor.utils.js index 26d265056..0b4460483 100644 --- a/resources/linkeditor/js/linkeditor.utils.js +++ b/resources/linkeditor/js/linkeditor.utils.js @@ -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'); } };