Skip to content

Commit

Permalink
fix(Select): should prevent scroll when click wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
chenkeyao.chenkeya committed Oct 31, 2023
1 parent 31bc830 commit 36b3762
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/input/base.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -320,10 +320,8 @@ class Base extends React.Component {
return this.inputRef;
}

focus(start, end, preventScroll) {
if (typeof preventScroll === 'boolean') {
this.inputRef.focus({ preventScroll });
}
focus(start, end, preventScroll = false) {
this.inputRef.focus({ preventScroll });
if (typeof start === 'number') {
this.inputRef.selectionStart = start;
}
Expand Down

0 comments on commit 36b3762

Please sign in to comment.