feat: native tab panel overlay, webapp height no longer reserved

This commit is contained in:
2026-08-16 21:41:05 +08:00
parent 0154ebc999
commit 9fc3272923
3 changed files with 90 additions and 8 deletions
+3 -3
View File
@@ -28,9 +28,9 @@ window.showTopbar = function (tabs) {
fwd.onclick = () => bridge.call('webGoForward');
reload.onclick = () => bridge.call('webReload');
}
// 每次刷新都重绑,避免捕获旧 tabs(陈旧闭包
// Rebind on every refresh to avoid capturing stale tabs (stale closure)
document.getElementById('tb-tabs').onclick = () => showTabPanel(tabs);
// 标签按钮:调原生弹出标签面板(PopupWindow 在内容 WebView 之上
// Tab button: show the native tab panel (PopupWindow above the content WebView)
document.getElementById('tb-tabs').onclick = () => bridge.call('showTabPanel');
document.getElementById('tb-tabs').textContent = `标签 (${tabs.length})`;
const active = tabs.find(t => t.active);
document.getElementById('tb-title').textContent = active ? active.name : '';