mirror of
https://github.com/zen-browser/desktop.git
synced 2025-09-05 19:08:18 +00:00
Merge pull request #6535 from Slowlife01/focus-webpanel
enhance media focus handling to support sidebar opening
This commit is contained in:
@@ -428,7 +428,10 @@ class ZenMediaController {
|
||||
}
|
||||
|
||||
onMediaFocus() {
|
||||
this._currentMediaController?.focus();
|
||||
if (!this._currentBrowser) return;
|
||||
const sidebarId = this._currentBrowser.getAttribute('zen-sidebar-id');
|
||||
if (sidebarId) gZenBrowserManagerSidebar.open(sidebarId);
|
||||
else this._currentMediaController?.focus();
|
||||
}
|
||||
|
||||
onMediaMute() {
|
||||
|
@@ -280,8 +280,10 @@ class ZenBrowserManagerSidebar extends ZenDOMOperatedFeature {
|
||||
this.close();
|
||||
}
|
||||
|
||||
open() {
|
||||
open(id = null) {
|
||||
let sidebar = document.getElementById('zen-sidebar-web-panel');
|
||||
if (id) this._currentPanel = id;
|
||||
|
||||
sidebar.removeAttribute('hidden');
|
||||
this.update();
|
||||
}
|
||||
|
Reference in New Issue
Block a user