Bug 981363 - Don't automove when the DOCUMENT_LOAD_COMPLETE is emitted for the actual document. r=yzenevich

This commit is contained in:
Eitan Isaacson 2014-10-03 17:27:00 +02:00
parent dd15b058d1
commit c0c13a4fbb

View File

@ -266,7 +266,8 @@ this.EventManager.prototype = {
case Events.DOCUMENT_LOAD_COMPLETE:
{
let position = this.contentControl.vc.position;
if (position && Utils.isInSubtree(position, aEvent.accessible)) {
if (aEvent.accessible === aEvent.accessibleDocument ||
(position && Utils.isInSubtree(position, aEvent.accessible))) {
// Do not automove into the document if the virtual cursor is already
// positioned inside it.
break;