Prevent option selection in ComboboxInput while composing (#1850)
* Fix should do nothing when event is fired within a composing session * update changelog * link to PR instead of issue Co-authored-by: Robin Malfait <malfait.robin@gmail.com>
This commit is contained in:
@@ -7,7 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
- Nothing yet!
|
||||
### Fixed
|
||||
|
||||
- Prevent option selection in `Combobox.Input` while composing ([#1850](https://github.com/tailwindlabs/headlessui/issues/1850))
|
||||
|
||||
## [1.7.1] - 2022-09-12
|
||||
|
||||
|
||||
@@ -713,6 +713,7 @@ let Input = forwardRefWithAs(function Input<
|
||||
|
||||
case Keys.Enter:
|
||||
if (data.comboboxState !== ComboboxState.Open) return
|
||||
if (event.nativeEvent.isComposing) return
|
||||
|
||||
event.preventDefault()
|
||||
event.stopPropagation()
|
||||
|
||||
@@ -7,7 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
- Nothing yet!
|
||||
### Fixed
|
||||
|
||||
- Prevent option selection in `ComboboxInput` while composing ([#1850](https://github.com/tailwindlabs/headlessui/issues/1850))
|
||||
|
||||
## [1.7.1] - 2022-09-12
|
||||
|
||||
|
||||
@@ -674,6 +674,7 @@ export let ComboboxInput = defineComponent({
|
||||
|
||||
case Keys.Enter:
|
||||
if (api.comboboxState.value !== ComboboxStates.Open) return
|
||||
if (event.isComposing) return
|
||||
|
||||
event.preventDefault()
|
||||
event.stopPropagation()
|
||||
|
||||
Reference in New Issue
Block a user