Closed gjvoosten closed 4 years ago
Happens to me also. DateInput's Popover with showArrowButtons
doesn't catch clicks on arrow buttons and closes.
"@blueprintjs/core": "^3.29.0",
"@blueprintjs/datetime": "^3.18.3",
Same problem , all latest versoins installed, please help!
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 https://github.com/palantir/blueprint/pull/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!