Skip to content

Commit

Permalink
fix TimePicker cause jump occasionally
Browse files Browse the repository at this point in the history
  • Loading branch information
afc163 committed Nov 13, 2019
1 parent f45197a commit ebf24bc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ coverage
yarn.lock
es/
package-lock.json
src/*.js
src/*.map
.prettierrc
tslint.json
Expand Down
3 changes: 2 additions & 1 deletion src/Header.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,11 @@ class Header extends Component {
// requestAnimationFrame will cause jump on rc-trigger 3.x
// https://github.com/ant-design/ant-design/pull/19698#issuecomment-552889571
// use setTimeout can resolve it
// 60ms is a magic timeout to avoid focusing before dropdown reposition correctly
this.timeout = setTimeout(() => {
this.refInput.focus();
this.refInput.select();
});
}, 60);
}
}

Expand Down

0 comments on commit ebf24bc

Please sign in to comment.