Skip to content

Edge case on pseudo-drag closing

Compare
Choose a tag to compare
@renatodeleao renatodeleao released this 01 May 16:46
· 160 commits to master since this release

A user found this edge case while "pseudo-dragging2 text selection from within to outside dialog (backdrop). Since its dialog backdrop was allso the root (wrapper) of the dialogRef itself, mouseup event bubbled and triggered click event at backdropRef (note: expected native behaviour) and closing the dialog.

Although it's the native behaviour, it's apparently not user-friend.

I wasn't sure if i should write code to handle this edge case or add a note to the docs, saying:

if you don't want this behaviour, make sure your backdropRef is not the same element as your dialog wrapper (root).

I end up including it, till some-else complains, hopefully after v1.0.0 will have more feedback for the expected usage.

Uff, this was long: now this doesn't happen by default ⬇

edge-case-pseudo-drag

Implementation

f61af1a