Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refocus after load completes failing. #72

Open
nathanhammond opened this issue Jan 8, 2019 · 1 comment
Open

Refocus after load completes failing. #72

nathanhammond opened this issue Jan 8, 2019 · 1 comment

Comments

@nathanhammond
Copy link
Contributor

@BrennanRoberts reports that focus state is not successfully re-triggered when moving out of a loading state and into the desired content for a particular outlet. This issue appears to only affect Chrome/(Blink?).

This happens synchronously, so it's possible that Blink doesn't support that behavior.

We should test a few options:

  • Pushing the focus set onto the microtask queue. (Promise.resolve().then(() => { this.scrollPositionFocus(); }))
  • Pushing the focus set onto the macrotask queue. (setTimeout(() => { this.scrollPositionFocus(); }, 0);)
  • Pushing the focus set into a future backburner queue flush. (Ember.run.next(this, 'scrollPositionFocus');)

We would of course need to make sure that the async strategy still worked as expected with regards to Ember lifecycle and we did not break other browser/AT combinations.

Reproduction:
https://github.com/BrennanRoberts/ember-a11y-loading-focus-test-case

@BrennanRoberts
Copy link

Thanks for the suggestions, I'll look into this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants