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
set the Date format to YYYY-MM-DD HH:mm:ss (moment)
set the Time precision to e.g. Minute
click in the date input field
go to the previous (or next) month
click one of the time picker arrows (up or down)
Actual behavior
The DateInput popover is closed, time in the input field is unchanged.
Expected behavior
The DateInput popover stays open, time in the input field is updated.
Possible solution
The whole thing appears to balance on how registerPopoverBlurHandler() in dateInput.tsx works: when clicking next/previous month, this registers a blur handler. When clicking on a time picker arrow (an svg), e.relatedTarget inside handlePopoverBlur(e) is null/undefined and document.activeElement is <body> (that is, since 3.9.0 i.e. my own PR #3471 — not that it is functionally any different for 3.8.0). So the code assumes there was a click somewhere else and closes the popover.
I've looked into various approaches to tackle this, but haven't found anything that would fit. I'm willing to help make this work, let me know!
The text was updated successfully, but these errors were encountered:
Environment
Steps to reproduce
Make the following change to the DateInput example:
then:
Actual behavior
The DateInput popover is closed, time in the input field is unchanged.
Expected behavior
The DateInput popover stays open, time in the input field is updated.
Possible solution
The whole thing appears to balance on how
registerPopoverBlurHandler()
indateInput.tsx
works: when clicking next/previous month, this registers a blur handler. When clicking on a time picker arrow (an svg),e.relatedTarget
insidehandlePopoverBlur(e)
isnull
/undefined
anddocument.activeElement
is<body>
(that is, since3.9.0
i.e. my own PR #3471 — not that it is functionally any different for3.8.0
). So the code assumes there was a click somewhere else and closes the popover.I've looked into various approaches to tackle this, but haven't found anything that would fit. I'm willing to help make this work, let me know!
The text was updated successfully, but these errors were encountered: