bem-components
bem-components copied to clipboard
modal_autoclosable: close on highlighting text
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.
As a temporary fix, I’m comparing event.target from pointerdown and pointerup.