bem-components icon indicating copy to clipboard operation
bem-components copied to clipboard

modal_autoclosable: close on highlighting text

Open rtemision opened this issue 5 years ago • 1 comments

If you start highlight text and stopping the highlighting outside of elem content then in the pointerclick event.target will be the parent node of the content element, and as a result the modal closes.

Here can be repeated: hold down mouse button and with the mouse movement highlight the text in title or input/textarea from left to right and let go of the mouse button the mouse button outside the content element - modal closes. In Firefox, it is not always possible to repeat with input and textarea, but with simple text regularly, in Chrome - without much difference.

rtemision avatar Apr 28 '19 14:04 rtemision

As a temporary fix, I’m comparing event.target from pointerdown and pointerup.

rtemision avatar Apr 28 '19 14:04 rtemision