bem / bem-components

Set of components for sites development
https://bem.info/libraries/classic/bem-components/6.0.0/
Other
333 stars 87 forks source link

modal_autoclosable: close on highlighting text #2115

Open rtemision opened 5 years ago

rtemision commented 5 years ago

If you start highlight text and stopping the highlighting outside of elem content then in thepointerclick 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 commented 5 years ago

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