Fix focused element of popup menus (#937)

This commit is contained in:
toasted-nutbread 2020-10-18 18:21:10 -04:00 committed by GitHub
parent 988ea8f70a
commit a920445883
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -27,7 +27,7 @@ class PopupMenu {
prepare() {
const items = this._menu.querySelectorAll('.popup-menu-item');
this._setPosition(items);
this._menu.focus();
this._container.focus();
this._eventListeners.addEventListener(window, 'resize', this._onWindowResize.bind(this), false);
this._eventListeners.addEventListener(this._container, 'click', this._onMenuContainerClick.bind(this), false);