You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Open page and notice that the component works well.
Make browser height small.
Click on input to open date picker.
Scroll down on the page so that the input is no longer visible in the viewport.
Click on a date.
Notice that the browser jumps to focus on the input and a date is not selected. This only happens if the window was small enough that the browser had to scroll to focus on the input.
This discussion was converted from issue #847 on February 10, 2021 02:59.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello!
Reproduction link: https://codesandbox.io/s/wq906r3rr7
Steps to reproduce:
This happens when
.focus
runs:react-day-picker/src/DayPickerInput.js
Lines 372 to 383 in d485bfe
For reasons I don't understand, it prevents
handeDayClick
from running:react-day-picker/src/DayPickerInput.js
Lines 456 to 506 in d485bfe
A workaround is to set
keepFocus={false}
, although I imagine that this is still not the desired behavior ifkeepFocus
istrue
.I've only tested this in Chrome.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions