Closed Bug 964534 Opened 6 years ago Closed 6 years ago

[AccessFu] Move cursor when dialog appears

Categories

(Core :: Disability Access APIs, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla29

People

(Reporter: eeejay, Assigned: eeejay)

References

Details

Attachments

(1 file)

When a dialog appears, move cursor into the dialog.
Comment on attachment 8366322 [details] [diff] [review]
Move cursor to new dialog if focus does not change the cursor first.

Review of attachment 8366322 [details] [diff] [review]:
-----------------------------------------------------------------

r=me with some comments.

::: accessible/src/jsat/EventManager.jsm
@@ +274,5 @@
>          // Put vc where the focus is at
>          let acc = aEvent.accessible;
>          let doc = aEvent.accessibleDocument;
>          if (acc.role != Roles.DOCUMENT && doc.role != Roles.CHROME_WINDOW) {
> +          this._focusMove = false;

if we use the |this._autoFocus| described below this would be:
this.contentScope.content.clearTimeout(this._autoFocus);

If this stays, at discussed, it should be this._focusMove = true;

@@ +283,5 @@
>        }
> +      case Events.DOCUMENT_LOAD_COMPLETE:
> +      {
> +        this._focusMove = false;
> +        this.contentScope.content.setTimeout(() => {

What if we use |this._autoFocus| then we don't have to do anything related to the flag inside the timeout callback:

this._autoFocus = this.contentScope.content.setTimeout(() => {
  let vc = Utils.getVirtualCursor(aEvent.accessibleDocument);
  vc.moveNext(TraversalRules.Simple, aEvent.accessible, true);
}, 500);
Attachment #8366322 - Flags: review?(yzenevich) → review+
https://hg.mozilla.org/mozilla-central/rev/49e73a6d4c06
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla29
Duplicate of this bug: 934684
You need to log in before you can comment on or make changes to this bug.