From: Vincent Vanwaelscappel Date: Fri, 28 Apr 2023 09:24:01 +0000 (+0200) Subject: wait #5895 @0:20 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=43d51da9c5e5cdf30551bebda44d4a6a052a69f6;p=fluidbook-toolbox.git wait #5895 @0:20 --- diff --git a/resources/linkeditor/js/linkeditor.js b/resources/linkeditor/js/linkeditor.js index f8bdcdcc1..8862b01dc 100644 --- a/resources/linkeditor/js/linkeditor.js +++ b/resources/linkeditor/js/linkeditor.js @@ -523,6 +523,7 @@ LinkEditor.prototype = { getCurrentPage: function () { return this.currentPage; }, + } diff --git a/resources/linkeditor/js/linkeditor.links.js b/resources/linkeditor/js/linkeditor.links.js index 1dbea0fc1..7c86b7bbe 100644 --- a/resources/linkeditor/js/linkeditor.links.js +++ b/resources/linkeditor/js/linkeditor.links.js @@ -445,9 +445,10 @@ LinkeditorLinks.prototype = { if (shortcut === 'pageup' || shortcut === 'pagedown' || shortcut === 'enter') { return true; } - return !$(document.activeElement).is('input,textarea,select'); + return !this.linkeditor.utils.isfocusOnFormItem(); }, + openImageLink: function () { let selection = $(".link[fb-type=6].selected"); if (selection.length !== 1 || selection.attr('fb-alternative') == '') { diff --git a/resources/linkeditor/js/linkeditor.toolbar.js b/resources/linkeditor/js/linkeditor.toolbar.js index c277ce06a..c4e2b9bba 100644 --- a/resources/linkeditor/js/linkeditor.toolbar.js +++ b/resources/linkeditor/js/linkeditor.toolbar.js @@ -15,6 +15,9 @@ LinkeditorToolbar.prototype = { $("[data-key]").each(function () { let e = $(this); key($(this).data('key'), function () { + if ($(e).is('[data-key-skipintextfields]') && $this.linkeditor.utils.isfocusOnFormItem()) { + return true; + } $(e).addClass('hover'); $this.linkeditor.runAction($(e).data('action')); setTimeout(function () { diff --git a/resources/linkeditor/js/linkeditor.utils.js b/resources/linkeditor/js/linkeditor.utils.js index a111550b6..26d265056 100644 --- a/resources/linkeditor/js/linkeditor.utils.js +++ b/resources/linkeditor/js/linkeditor.utils.js @@ -142,6 +142,9 @@ LinkeditorUtils.prototype = { r2.top > r1.bottom || r2.bottom < r1.top); }, + isfocusOnFormItem: function () { + return $(document.activeElement).is('input,textarea,select'); + } }; module.exports = LinkeditorUtils; diff --git a/resources/views/fluidbook_publication/link_editor.blade.php b/resources/views/fluidbook_publication/link_editor.blade.php index a0160db0a..bd6e465db 100644 --- a/resources/views/fluidbook_publication/link_editor.blade.php +++ b/resources/views/fluidbook_publication/link_editor.blade.php @@ -155,10 +155,10 @@ data-key="ctrl+s"> + data-key="ctrl+z" data-key-skipintextfields> + data-key="ctrl+shift+z" data-key-skipintextfields>