Don't handle selections that are not from the inner frame

pull/1447/head
Peter 'Pita' Martischka 2013-02-03 13:44:37 +00:00
parent 9c0f881811
commit d30daccb10
1 changed files with 5 additions and 0 deletions

View File

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