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

fix(autocomplete): input focus behavior on value change #2852

Merged
merged 11 commits into from Nov 15, 2021

Conversation

katebatura
Copy link
Contributor

@katebatura katebatura commented Sep 1, 2021

Please read and mark the following check list before creating a pull request:

Short description of what this resolves:

Closes #2401

Focus behavior when a value is set to the input bound to an Autocomplete:

  • handled by writeValue() don't focus the input.
  • because of autocomplete interactions (option mouse/keyboard select) the input is on focus.

BREAKING CHANGE:
Removed focusInputOnValueChange from NbAutocompleteDirective. Now autocomplete focuses input only when value is selected by option click or keyboard selection.

@katebatura katebatura requested a review from yggg September 1, 2021 11:37
@yggg yggg added this to the 9.0.0 milestone Sep 14, 2021
@katebatura katebatura changed the title fix(nb-autocomplete): input focus behavior on value change fix(autocomplete): input focus behavior on value change Sep 14, 2021
@katebatura katebatura changed the title fix(autocomplete): input focus behavior on value change BREAKING CHANGE(autocomplete): input focus behavior on value change Sep 16, 2021
@katebatura katebatura changed the title BREAKING CHANGE(autocomplete): input focus behavior on value change fix(autocomplete): input focus behavior on value change Sep 16, 2021
Copy link
Contributor

@yggg yggg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we also focus input when selecting option by enter (handleInputValueUpdate call from the subscribeOnOverlayKeys method)?

@katebatura katebatura requested a review from yggg November 15, 2021 14:16
@yggg yggg merged commit a86da11 into akveo:master Nov 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Autocomplete: don't focus input on write value
2 participants