X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/612d7ff15c5ba8f014755af33b766f9db76f7df5..17683274ad99fde6de3c1c6c292c125cf8bc1956:/src/editor/modules/documentCanvas/canvas/keyboard.js?ds=inline diff --git a/src/editor/modules/documentCanvas/canvas/keyboard.js b/src/editor/modules/documentCanvas/canvas/keyboard.js index d8052ed..e43ea89 100644 --- a/src/editor/modules/documentCanvas/canvas/keyboard.js +++ b/src/editor/modules/documentCanvas/canvas/keyboard.js @@ -257,6 +257,14 @@ var keyEventHandlers = [ return; } + + var parent = element.wlxmlNode.parent(); + if(element.wlxmlNode.getIndex() === 0 && parent.isContextRoot() && (!parent.is('item') || parent.getIndex() === 0)) { + // Don't even try to do anything at the edge of a context root, except for non-first items + // - this is a temporary solution until key events handling get refactored into something more sane. + return; + } + e.preventDefault(); s.canvas.wlxmlDocument.transaction(function() {