]> _ Git - fluidbook-html5.git/commitdiff
wait #7741 @0.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 7 Oct 2025 16:17:17 +0000 (18:17 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 7 Oct 2025 16:17:17 +0000 (18:17 +0200)
js/libs/fluidbook/fluidbook.keyboard.js

index 9a1ebb418e4b433572cb97fadbe47430b24d1c11..ccc8d6735e56dd83c541a1fefa459b916b46fbd4 100644 (file)
@@ -105,12 +105,16 @@ FluidbookKeyboard.prototype = {
             let iframe = $(this);
             $(this).on('load', function () {
                 let win = $(iframe).get(0).contentWindow;
-                let doc = win.document;
-                doc.addEventListener('keydown', function (e) {
-                    if (e.code === 'Escape') {
-                        $this.escape();
-                    }
-                });
+                try {
+                    let doc = win.document;
+                    doc.addEventListener('keydown', function (e) {
+                        if (e.code === 'Escape') {
+                            $this.escape();
+                        }
+                    });
+                } catch (e) {
+
+                }
             });
 
         });