angular-multi-select icon indicating copy to clipboard operation
angular-multi-select copied to clipboard

Prevent default when escape button is pressed?

Open slavafomin opened this issue 10 years ago • 2 comments

I have a situation where component is used inside of the modal window. When I click on the button, the popup selector is shown. However, when I press escape key to close the selector, the modal dialog is closed instead.

Maybe we should prevent event propagation? Of couse it should be done only if component is actually focused and selector is opened.

I've tried to experiment with the native <select> element. It behaves as I described in Google Chrome. When you click the escape when list is expanded - the list collapses, but event is not propagating further. I think is is a correct behavior that ensures good usability.

slavafomin avatar Mar 19 '15 11:03 slavafomin

@slavafomin ,

Thanks for the feedback, I never thought of this before. We'll see what I can do.

isteven avatar Mar 19 '15 14:03 isteven

So is that possible to catch last clicked element in event?

piotrgolawski avatar Aug 31 '17 07:08 piotrgolawski