Created by: pvdlg
Re-open #19978 following a mistake while resolving conflicts.
Currently the behavior of dropdown menu is inconsistent for mouse and keyboard users:
- when menu is open, clicking outside, close it
- when menu is open, focusing outside (tab key), doesn't close it
The changes in this PR close the dropdown menu when focusing on an element outside the dropdown menu. It's handled in a similar fashion it's currently done for click events (except that focusin events inside the menu don't close it contrary to click events).