We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
By default, the autofocus is applied to the first focusable child of the element to which the modifier is attached to, as visible here: https://github.com/qonto/ember-autofocus-modifier/blob/master/ember-autofocus-modifier/src/modifiers/autofocus.js#L24
👉 Notice how selector === DEFAULT_SELECTOR by default: https://github.com/qonto/ember-autofocus-modifier/blob/master/ember-autofocus-modifier/src/modifiers/autofocus.js#L17
selector === DEFAULT_SELECTOR
This beheavior isn't ideal, as we may want to check the element to which the autofocus modifier itself is attached to first.
Example
<details> <summary {{autofocus}}>Napoleon surname <input type="text" /></summary> <p>Bonaparte</p> </details>
Current behavior
With the current implementation, the focus would go to the input element, while focusing the summary element could be exactly what the user expected.
input
summary
Expected behavior
The summary element should be the one focused, leaving the input unfocused.
Any thoughts about this?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
By default, the autofocus is applied to the first focusable child of the element to which the modifier is attached to, as visible here: https://github.com/qonto/ember-autofocus-modifier/blob/master/ember-autofocus-modifier/src/modifiers/autofocus.js#L24
This beheavior isn't ideal, as we may want to check the element to which the autofocus modifier itself is attached to first.
Example
Current behavior
With the current implementation, the focus would go to the
input
element, while focusing thesummary
element could be exactly what the user expected.Expected behavior
The
summary
element should be the one focused, leaving theinput
unfocused.Any thoughts about this?
The text was updated successfully, but these errors were encountered: