Closed martinadamec closed 4 years ago
Hi, I don't know. I will need to examine it.
We are also experiencing this same issue - has this recently been introduced?
This appears to be related to the dayRef
used to initialise the useDay
hook.
By removing the ref from our rendered JSX element we were able to resolve this issue.
This appears to be related to the
dayRef
used to initialise theuseDay
hook.By removing the ref from our rendered JSX element we were able to resolve this issue.
nice :), would you do a PR? or at least fork the repo with these changes?
@marekstracar - See PR that references this issue above.
I believe consequences are a loss of keyboard control until we find a fix upstream.
I think the issue relates to this line.
Thank you. I will do a PR in the afternoon.
Should be fixed in version 2.4.1.
@datepicker-react/hooks@2.4.0
Describe the bug When I have an input in the same page with a datepicker, I use arrows for navigate in the datepicker, after that ...I hit a key in the input, input lose focus and datepicker has focus back (at last focused day).
I created a repo with this bug. It is happen with CRA (create react app). I used base example plus default html input.
Source code (including props configuration) https://github.com/martinadamec/datepicker-hooks-lose-input-focus-bug
Screen record https://github.com/martinadamec/datepicker-hooks-lose-input-focus-bug/blob/master/screen-record.mov
Desktop (please complete the following information):
Any idea what is wrong? Thank you Martin.