Skip to content

Commit

Permalink
Merge pull request ant-design#16918 from oakslab/master
Browse files Browse the repository at this point in the history
fix: cascader unable to enter space during search ant-design#16871
  • Loading branch information
afc163 authored Jun 2, 2019
2 parents 86bc281 + 24ee163 commit 7c0fd87
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion components/cascader/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,8 @@ class Cascader extends React.Component<CascaderProps, CascaderState> {
};

handleKeyDown = (e: React.KeyboardEvent<HTMLInputElement>) => {
if (e.keyCode === KeyCode.BACKSPACE) {
// SPACE => https://github.com/ant-design/ant-design/issues/16871
if (e.keyCode === KeyCode.BACKSPACE || e.keyCode === KeyCode.SPACE) {
e.stopPropagation();
}
};
Expand Down

0 comments on commit 7c0fd87

Please sign in to comment.