material icon indicating copy to clipboard operation
material copied to clipboard

md-select prevent focus on close

Open evoker opened this issue 11 years ago • 2 comments

Hi,

is it possible to stop the focus event for md-select after it closes?

My problem lies with this line here:

if (opts.restoreFocus) opts.target.focus();

The select box in question is at the bottom of the page and since it's focused after it closes, it messes with my page refresh.

I have attempted to prevent the event from firing altogether but I had no luck so far.

Thanks in advance for any comments/input.

evoker avatar May 21 '15 11:05 evoker

This focus event is necessary for accessibility, because the list items are separated from the actual select. Can you provide a Codepen or Plunker showing your code?

marcysutton avatar May 21 '15 18:05 marcysutton

This makes it difficult to support a simple editor which relies on this not happening :|

nyxtom avatar Jul 06 '15 18:07 nyxtom