Skip to content

Conversation

@andygout
Copy link
Contributor

@andygout andygout commented Dec 29, 2025

Describe your changes

Currently, oAutocomplete does not pass a confirmOnBlur prop to accessibleAutocomplete, and so the default value of true is used.

This PR allows oAutocomplete to receive a configurable confirmOnBlur prop from the consumer which it then passes on to accessibleAutocomplete.

The following video demonstrations include the following steps:

  • Enter text into input field and await options
  • Use keyboard directional keys to focus on an option
  • Use the mouse to click on the "clear input" button (consequently blurring the input; the same effect can be achieved by pressing the keyboard tab button)

confirmOnBlur: true

new oAutocomplete(oAutocompleteElement, {
	
	confirmOnBlur: true,});
true.mov

confirmOnBlur: false

new oAutocomplete(oAutocompleteElement, {
	
	confirmOnBlur: false,});
false.mov

confirmOnBlur: undefined

new oAutocomplete(oAutocompleteElement, {// i.e. confirmOnBlur has not been defined in the props
});

Same as confirmOnBlur: true, i.e. true remains the default.

true.mov

Additional context

N/A

Checklist before requesting a review

  • I have applied percy label for o-[COMPONENT] or chromatic label for o3-[COMPONENT] on my PR before merging and after review. Find more details in CONTRIBUTING.md
  • If it is a new feature, I have added thorough tests.
  • I have updated relevant docs.
  • I have updated relevant env variables in Doppler.

@andygout andygout requested a review from a team as a code owner December 29, 2025 17:30
@andygout andygout marked this pull request as draft December 29, 2025 17:52
@andygout andygout force-pushed the feat-add-confirm-on-blur-prop branch 2 times, most recently from d2bea84 to 587c4ee Compare December 29, 2025 20:56
@andygout andygout changed the title feat: Add confirmOnBlur prop feat: Add o-autocomplete confirmOnBlur prop Dec 29, 2025
@andygout andygout marked this pull request as ready for review December 29, 2025 21:00
@andygout andygout force-pushed the feat-add-confirm-on-blur-prop branch from 587c4ee to 9b4d0aa Compare December 29, 2025 21:06
@andygout andygout changed the title feat: Add o-autocomplete confirmOnBlur prop feat: Add o-autocomplete confirmOnBlur option Dec 29, 2025
@j-mes j-mes self-requested a review January 7, 2026 14:34
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.

4 participants