Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
kchr
· 2y ago · 0 comments
This could probably be fixed by tracking whether the mousedown event was started inside or outside the dialog, and only close the dialog if the mousedown started outside it.
Comments
[–]
wruza
2y ago
It’s called a cursor grab and in the web exists as el.setPointerCapture().
https://developer.mozilla.org/en-US/docs/Web/API/Element/set...