Open hcampos-professional opened 4 weeks ago
@jcfranco I think this is a regression from https://github.com/Esri/calcite-design-system/pull/8943
We switched from pointerdown
to click
.
This works fine in 2.6.0 https://codepen.io/driskull/pen/QWRMjPE?editors=100
Should we move back to pointerdown
?
We also need to track where the release happens since the previous behavior was prone to closing early (e.g., the popover shouldn't close if a click starts outside and ends within the popover or vice versa).
This would also apply to tooltip.
Check existing issues
Description
At the time of writing, the
<calcite-popover auto-close>
is closed when the user clicks outside of it, even if the pointer/mouse down was done inside of the popover. That makes it very easy to accidentally the popover when selecting text, in it, for example: a user presses the mouse and starts dragging to select the text, but releases the pointer outside of the popover, causing it to be closed.This is fairly easy to work around by tracking
pointerdown
andmousedown
and then usingonCalcitePopoverBeforeClose
to prevent the dialog being closed if the down events happened outside of the popover. However, it would be nicer if it was supported directly by Calcite.Acceptance Criteria
The popover should only be automatically closed if the "full click" gesture happened outside of it.
Relevant Info
No response
Which Component