When clicking and dragging to select text, if the user releases their cursor outside the modal/dialog window, the modal/dialog will close (specifically on Chrome). This is because the click event uses the hovered target on mouseup, which trips the closeOnClickOutside logic. On other browsers like Firefox, the target is the element hovered on mousedown.
Describe the changes in this PR
Update @click.capture to @mousedown.capture for the modal/dialog layer components to trigger the closeOnClickOutside logic.
Describe the problem this PR addresses
When clicking and dragging to select text, if the user releases their cursor outside the modal/dialog window, the modal/dialog will close (specifically on Chrome). This is because the
click
event uses the hovered target onmouseup
, which trips thecloseOnClickOutside
logic. On other browsers like Firefox, the target is the element hovered onmousedown
.Describe the changes in this PR
@click.capture
to@mousedown.capture
for the modal/dialog layer components to trigger thecloseOnClickOutside
logic.Other information