Bug 758884 - (part 1/2) Present virtual cursor before modifying focus. r=davidb

This commit is contained in:
Eitan Isaacson 2012-05-30 15:14:23 -07:00
parent 8dd97201ba
commit 98331abc0e

View File

@ -217,6 +217,11 @@ var AccessFu = {
let position = pivot.position;
let doc = aEvent.DOMNode;
let presenterContext =
new PresenterContext(position, event.oldAccessible);
this.presenters.forEach(
function(p) { p.pivotChanged(presenterContext); });
if (position && position.DOMNode &&
doc instanceof Ci.nsIDOMDocument) {
// Set the caret to the start of the pivot position, and move
@ -230,11 +235,6 @@ var AccessFu = {
.getService(Ci.nsIFocusManager).moveFocus(
doc.defaultView, null, Ci.nsIFocusManager.MOVEFOCUS_CARET, 0);
}
let presenterContext = new PresenterContext(pivot.position,
event.oldAccessible);
this.presenters.forEach(
function(p) { p.pivotChanged(presenterContext); });
break;
}
case Ci.nsIAccessibleEvent.EVENT_STATE_CHANGE: