Skip to content

Commit 5da58a3

Browse files
committed
🐛 (lib)-fix scroll on keydown
1 parent 67dad78 commit 5da58a3

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

lib/autocomplete/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ class AutoComplete extends Component {
122122
and selecting an option.
123123
*/
124124
handleKeyDown = (e) => {
125-
e.stopPropagation();
125+
e.preventDefault();
126126
const { data, focus, input } = this.state;
127127
const { labelKey, onChange } = this.props;
128128
const inputlabel = input[`${labelKey}`].toLowerCase();

lib/multiselect/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class MultiSelect extends Component {
6464
};
6565

6666
handleKeyPress = (e) => {
67-
e.stopPropagation();
67+
e.preventDefault();
6868
const { options } = this.props;
6969
const { input, selected, focus } = this.state;
7070
const isValid =

lib/select/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class Select extends Component {
5050
* @memberof Select
5151
*/
5252
handleKeyDown = (e) => {
53-
e.stopPropagation();
53+
e.preventDefault();
5454
const { focus } = this.state;
5555
const { options } = this.props;
5656
switch (e.key) {

0 commit comments

Comments
 (0)