PDF editor: Do not catch keyboard events inside source view

This commit is contained in:
Raphael Michel
2020-01-03 18:30:33 +01:00
parent 8e2821b398
commit 244e0695b1

View File

@@ -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);