Bug 981363 - Don't automove when the DOCUMENT_LOAD_COMPLETE is emitted for the actual document. r=yzenevich, a=lmandel
authorEitan Isaacson <eitan@monotonous.org>
Fri, 03 Oct 2014 17:27:00 +0200
changeset 225624 956319e1441fd60b0385f611fd233d3c398abfa1
parent 225623 797651324cc0f9fed229a4d841587d6bae3c3d56
child 225625 5e6a9d665beb39b4688d584940d6c24d7728b824
push id3979
push userraliiev@mozilla.com
push dateMon, 13 Oct 2014 16:35:44 +0000
treeherdermozilla-beta@30f2cc610691 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersyzenevich, lmandel
bugs981363
milestone34.0a2
Bug 981363 - Don't automove when the DOCUMENT_LOAD_COMPLETE is emitted for the actual document. r=yzenevich, a=lmandel
accessible/jsat/EventManager.jsm
--- a/accessible/jsat/EventManager.jsm
+++ b/accessible/jsat/EventManager.jsm
@@ -261,17 +261,18 @@ this.EventManager.prototype = {
        if (this.inTest) {
         this.sendMsgFunc("AccessFu:Focused");
        }
        break;
       }
       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;
         }
         this.contentControl.autoMove(
           aEvent.accessible, { delay: 500 });
         break;
       }