From: Aleksander Ɓukasz Date: Wed, 14 Aug 2013 07:33:46 +0000 (+0200) Subject: Fix X-Git-Url: https://git.mdrn.pl/fnpeditor.git/commitdiff_plain/b1de2ef622519ea790e89bc690f2c4d84e93adec?ds=inline Fix --- diff --git a/modules/documentCanvas/canvas/keyboard.js b/modules/documentCanvas/canvas/keyboard.js index d851e3e..3ce1871 100644 --- a/modules/documentCanvas/canvas/keyboard.js +++ b/modules/documentCanvas/canvas/keyboard.js @@ -173,11 +173,11 @@ handlers.push({keys: [KEYS.BACKSPACE, KEYS.DELETE], if(grandParent && grandParent.children().length === 1) { goto = grandParent.append({text: ''}); } else { - goto = canvas.getDocumentElement(utils.nearestInDocumentOrder('[document-text-element]', direction, element.dom()[0])); + goto = canvas.getDocumentElement(utils.nearestInDocumentOrder('[document-text-element]:visible', direction, element.dom()[0])); } parent.detach(); } else { - goto = canvas.getDocumentElement(utils.nearestInDocumentOrder('[document-text-element]', direction, element.dom()[0])); + goto = canvas.getDocumentElement(utils.nearestInDocumentOrder('[document-text-element]:visible', direction, element.dom()[0])); element.detach(); } canvas.setCurrentElement(goto, {caretTo: caretTo});