Skip to content

Commit

Permalink
[@mantine/core] TagsInput: Fix incorrect IME keyboard input handling (#…
Browse files Browse the repository at this point in the history
…4947)

* Fix IME when 'Enter' key is pressed
  • Loading branch information
chanwukim authored Oct 2, 2023
1 parent afed439 commit bf22134
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/mantine-core/src/components/TagsInput/TagsInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ export const TagsInput = factory<TagsInputFactory>((_props, ref) => {
event.preventDefault();
}

if (event.key === 'Enter' && length > 0) {
if (event.key === 'Enter' && length > 0 && !event.nativeEvent.isComposing) {
event.preventDefault();
const isDuplicate = _value.some((tag) => tag.toLowerCase() === inputValue.toLowerCase());

Expand Down

0 comments on commit bf22134

Please sign in to comment.