]> _ Git - fluidbook-toolbox.git/commitdiff
wip #6482 @0:30
authorsoufiane <soufiane@cubedesigners.com>
Tue, 12 Dec 2023 13:27:38 +0000 (14:27 +0100)
committersoufiane <soufiane@cubedesigners.com>
Tue, 12 Dec 2023 13:27:38 +0000 (14:27 +0100)
resources/linkeditor/js/linkeditor.js
resources/linkeditor/js/linkeditor.popup.js

index bfad4fd01014de2d1ff2cde8203facdced32f2e7..e053120f7e48acbcdbd005a67361c12443a1d7a8 100644 (file)
@@ -568,12 +568,6 @@ LinkEditor.prototype = {
     getCurrentPage: function () {
         return this.currentPage;
     },
-
-    disableKeyboard: function (disable) {
-        $(document).keydown(function(e) {
-            e.preventDefault()
-        })
-    }
 }
 
 
@@ -609,12 +603,12 @@ $(function () {
                         keyfilter(false,true)
                     }
                 } else {
-                    $("#popup-overlay").removeClass("show")
-                    window.linkeditor.popup.close('unavailable');
-                    window.linkeditor.disableKeyboard(false)
+                    if ($("#popup-overlay").find('.popup[data-popup="unavailable"]').length > 0) {
+                        $("#popup-overlay").removeClass("show")
+                        window.linkeditor.popup.close();
+                    }
                     window.key.filter = function (event) {
                         let tagName = (event.target || event.srcElement).tagName;
-                        //let field=tagName == 'INPUT' || tagName == 'SELECT' || tagName == 'TEXTAREA';
                         if (tagName === 'TEXTAREA' && event.keyCode === 13) {
                             return false;
                         }
index 923c48ef5a2c70986e00bbae27a9ed812b62877d..58d0a262d9271aa8fc023399851465b97e45e7f5 100644 (file)
@@ -24,7 +24,7 @@ LinkeditorPopup.prototype = {
         this.resize();
     },
 
-    close: function () {
+    close: function (name = '') {
         $("#popup-overlay").removeClass('show');
         $("#popup-holder").html('');
     },