From: Aleksander Ɓukasz Date: Sun, 4 Aug 2013 21:28:22 +0000 (+0200) Subject: Fix: Consider visible text elements only when searching for next available one X-Git-Url: https://git.mdrn.pl/fnpeditor.git/commitdiff_plain/c6c95712806748133328dc543b931905b26e2087?ds=sidebyside;hp=3cf3a2daadbd34576c9ae6cb4f96caef23c4e07d Fix: Consider visible text elements only when searching for next available one --- diff --git a/modules/documentCanvas/canvas/canvas.js b/modules/documentCanvas/canvas/canvas.js index 45147d1..5f78277 100644 --- a/modules/documentCanvas/canvas/canvas.js +++ b/modules/documentCanvas/canvas/canvas.js @@ -182,7 +182,7 @@ $.extend(Canvas.prototype, { direction = 'below'; caretTo = 'start'; } - element = canvas.getDocumentElement(utils.nearestInDocumentOrder('[document-text-element]', direction, window.getSelection().focusNode)); + element = canvas.getDocumentElement(utils.nearestInDocumentOrder('[document-text-element]:visible', direction, window.getSelection().focusNode)); } canvas.setCurrentElement(element, {caretTo: caretTo}); }