muicss/mui

Problem with stealing focus back to the select box

Open

#128 opened on Aug 9, 2016

View on GitHub
 (4 comments) (0 reactions) (0 assignees)JavaScript (4,524 stars) (441 forks)batch import
bughelp wantedpriority: high

Description

Problem reproduction: Go to the forms example and open the menu of a select control. Than click on the next input field below. The focus switches to the input field and later back to the select box.

In both the react- and the js-variant of mui-select you can find a statemen selectEl.focus(); It should refocus the select element after closing the corresponding menu. But if you close the menu by clicking into another control, the focus switches from the other control back to the select element. So the statement above should not be called if the menu is closed by not selecting a menu item.

Contributor guide