material-web icon indicating copy to clipboard operation
material-web copied to clipboard

fix(select): close select on menu close

Open 43081j opened this issue 9 months ago • 0 comments

There are some situations where the menu can close when the outer select is still open and unaware.

For example, clicking the field will open the menu, then clicking it again will close the menu but not the select.

This is because the menu observes outside clicks in order to close itself. We don't currently observe those closes to update our own state inside md-select, so the UI still shows as if it is open but without a menu.

The fix here is to always reflect the state of the menu on closed.

Example of this bug:

  • Go here
  • Click the select box
  • Click it again
  • Observe that it thinks it is still open (e.g. the arrow is pointing the wrong way)

43081j avatar Sep 10 '23 17:09 43081j