From 244e0695b143f4d65b8806aa2f7609f3c5b185fd Mon Sep 17 00:00:00 2001 From: Raphael Michel Date: Fri, 3 Jan 2020 18:30:33 +0100 Subject: [PATCH] PDF editor: Do not catch keyboard events inside source view --- src/pretix/static/pretixcontrol/js/ui/editor.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/pretix/static/pretixcontrol/js/ui/editor.js b/src/pretix/static/pretixcontrol/js/ui/editor.js index a22d448ef3..f24b730485 100644 --- a/src/pretix/static/pretixcontrol/js/ui/editor.js +++ b/src/pretix/static/pretixcontrol/js/ui/editor.js @@ -584,6 +584,9 @@ var editor = { _on_keydown: function (e) { var step = e.shiftKey ? editor._mm2px(10) : editor._mm2px(1); var thing = editor.fabric.getActiveObject() ? editor.fabric.getActiveObject() : editor.fabric.getActiveGroup(); + if ($("#source-container").is(':visible')) { + return true; + } switch (e.keyCode) { case 38: /* Up arrow */ thing.set('top', thing.get('top') - step);