mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-06 12:52:26 +00:00
Preserve focus opt-out when closing video menus
This commit is contained in:
1 parent
d1dd816c10
commit
b3d4220153
2 files changed
+11
-7
No files matched your search
@@ -424,13 +424,15 @@ export default class MoreMenuController {
|
||||
|
||||
closeAllMoreMenus(options = {}) {
|
||||
const skipView = options?.skipView === true;
|
||||
const restoreFocus = options?.restoreFocus !== false;
|
||||
|
||||
if (!skipView && this.videoListView && typeof this.videoListView.closeAllMenus === "function") {
|
||||
this.videoListView.closeAllMenus({ skipController: true });
|
||||
this.videoListView.closeAllMenus({
|
||||
skipController: true,
|
||||
restoreFocus,
|
||||
});
|
||||
}
|
||||
|
||||
const restoreFocus = options?.restoreFocus !== false;
|
||||
|
||||
this.popoversByTrigger.forEach((entry) => {
|
||||
if (entry?.popover && typeof entry.popover.close === "function") {
|
||||
entry.popover.close({ restoreFocus });
|
||||
|
||||
Reference in new issue
Block a user