self-focused icon indicating copy to clipboard operation
self-focused copied to clipboard

[Ember] Revisiting same route with no `didRender` does not set focus.

Open nathanhammond opened this issue 7 years ago • 2 comments

If you navigate anywhere that maintains the same route hierarchy (read: does not trigger the insert top-down behavior) you'll receive the render bottom-up behavior. If the result of the route change does not actually trigger the didRender lifecycle hook at the leaf-most-node it will result in focus being set to the closest self-focusing component whose didRender hook fired.

This happens, for example, when the content is completely static.

Reproducible in the existing test app. After loading:

  • Click "About"
  • Click "About" again.
  • Observe no focus state.

Alternatively:

  • Click "Topics"
  • Click "Components"
  • Click "Components" again.
  • Observe focus state set at the "Topics" level.

nathanhammond avatar Oct 20 '18 00:10 nathanhammond

Thank you for filling the issue and the detailed step to reproduce.

sarbbottam avatar Oct 21 '18 13:10 sarbbottam

You may be able to cheat here and have the contents of the self-focusing template be {{this.forceRender}}{{yield}}.

nathanhammond avatar Oct 22 '18 18:10 nathanhammond