From c6c95712806748133328dc543b931905b26e2087 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Aleksander=20=C5=81ukasz?= Date: Sun, 4 Aug 2013 23:28:22 +0200 Subject: [PATCH 1/1] Fix: Consider visible text elements only when searching for next available one --- modules/documentCanvas/canvas/canvas.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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}); } -- 2.20.1