From d30daccb10ac35690fc8bffa6723e41ae1274016 Mon Sep 17 00:00:00 2001 From: Peter 'Pita' Martischka Date: Sun, 3 Feb 2013 13:44:37 +0000 Subject: [PATCH] Don't handle selections that are not from the inner frame --- src/static/js/ace2_inner.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/static/js/ace2_inner.js b/src/static/js/ace2_inner.js index da8dea85..848fc20b 100644 --- a/src/static/js/ace2_inner.js +++ b/src/static/js/ace2_inner.js @@ -4119,6 +4119,11 @@ function Ace2Inner(){ selection.startPoint = pointFromRangeBound(range.startContainer, range.startOffset); selection.endPoint = pointFromRangeBound(range.endContainer, range.endOffset); selection.focusAtStart = (((range.startContainer != range.endContainer) || (range.startOffset != range.endOffset)) && browserSelection.anchorNode && (browserSelection.anchorNode == range.endContainer) && (browserSelection.anchorOffset == range.endOffset)); + + if(selection.startPoint.node.ownerDocument !== window.document){ + return null; + } + return selection; } else return null;