Bug 981363 - Don't automove when the DOCUMENT_LOAD_COMPLETE is emitted for the actual document. r=yzenevich
authorEitan Isaacson <eitan@monotonous.org>
Fri, 03 Oct 2014 17:27:00 +0200
changeset 233662 3b1edb52423b044c7dbcda694bf46cd3648b8d6c
parent 233661 6dc2eaf50c04bfab8f98b13756bb28c421674cf7
child 233663 344c06f4460b1f03a76f79c832c5e3677b6e0fa8
push id611
push userraliiev@mozilla.com
push dateMon, 05 Jan 2015 23:23:16 +0000
treeherdermozilla-release@345cd3b9c445 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersyzenevich
bugs981363
milestone35.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 981363 - Don't automove when the DOCUMENT_LOAD_COMPLETE is emitted for the actual document. r=yzenevich
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;
       }