Skip to content

Commit

Permalink
Fix #3885: Chips comma on Android (#3914)
Browse files Browse the repository at this point in the history
  • Loading branch information
melloware authored Jan 4, 2023
1 parent 50efc30 commit f33d614
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions components/lib/chips/Chips.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,13 @@ export const Chips = React.memo(

if (isMaxedOut()) {
event.preventDefault();
} else if (props.separator === ',' && event.key === ',') {
addItem(event, inputValue, true);
} else if (props.separator === ',') {
// GitHub #3885 Android Opera gives strange code 229 for comma
const ANDROID_COMMA = 229;

if (event.key === props.separator || event.which === ANDROID_COMMA) {
addItem(event, inputValue, true);
}
}

break;
Expand Down

0 comments on commit f33d614

Please sign in to comment.