···2929 -webkit-mask-image: -webkit-radial-gradient(white, white);
3030 }
31313232- /* Floating navbar - command-palette style overlay, NOT embedded */
3232+ /*
3333+ * FLOATING NAVBAR — DO NOT ADD AN INLINE/EMBEDDED NAVBAR
3434+ *
3535+ * The navbar is a FLOATING overlay shown via Cmd+L or hover trigger.
3636+ * It is NOT an embedded bar at the top of the page.
3737+ * It does NOT use -webkit-app-region: drag.
3838+ *
3939+ * Any inline/embedded navbar was deliberately removed.
4040+ * Do not re-add it under any circumstances without explicit user approval.
4141+ */
3342 .navbar {
3443 position: fixed;
3544 top: 40px;
+12-2
app/page/page.js
···66 * - Floating navbar overlay (Cmd+L to show, Escape/click-outside to dismiss)
77 * NOT embedded in window chrome — floats over content like a command palette
88 * - Resize via IPC to resize the BrowserWindow
99+ *
1010+ * FLOATING NAVBAR — DO NOT ADD AN INLINE/EMBEDDED NAVBAR
1111+ *
1212+ * The navbar is a FLOATING overlay shown via Cmd+L or hover trigger.
1313+ * It is NOT an embedded bar at the top of the page.
1414+ * It does NOT use -webkit-app-region: drag.
1515+ *
1616+ * Any inline/embedded navbar was deliberately removed.
1717+ * Do not re-add it under any circumstances without explicit user approval.
918 */
10191120import api from '../api.js';
···5867// Start initialization
5968initWebview();
60696161-// --- Resize via IPC (drag on navbar handled natively by -webkit-app-region: drag) ---
7070+// --- Resize via IPC ---
62716372let isResizing = false;
6473···125134});
126135127136// Cmd+L: show floating navbar with URL focus
128128-api.subscribe('page:show-navbar', () => show({ focusUrl: true }), api.scopes.WINDOW);
137137+// Published from main process with GLOBAL scope (both host and webview guest fire this)
138138+api.subscribe('page:show-navbar', () => show({ focusUrl: true }), api.scopes.GLOBAL);
129139130140// --- Nav button actions ---
131141
+17-4
backend/electron/ipc.ts
···21422142 // NOT the host's. We use did-attach-webview to intercept when the guest attaches
21432143 // and set up a setWindowOpenHandler that routes popups through Peek's window system
21442144 // instead of letting Electron create raw default BrowserWindows.
21452145+ //
21462146+ // Also adds Cmd+L interception on guest webContents for the floating navbar.
21472147+ // (Keystrokes inside the webview never reach the host's before-input-event.)
21452148 if (url.startsWith('http://') || url.startsWith('https://')) {
21462149 win.webContents.on('did-attach-webview', (_event, guestWebContents) => {
21472147- console.log(`[webview-popup] Guest webContents attached to window ${win.id}, adding setWindowOpenHandler`);
21502150+ console.log(`[webview-popup] Guest webContents attached to window ${win.id}, adding setWindowOpenHandler + Cmd+L`);
21512151+21522152+ // Cmd+L inside the webview guest: show the floating navbar
21532153+ guestWebContents.on('before-input-event', (event, input) => {
21542154+ if (input.type !== 'keyDown' || !input.meta) return;
21552155+ if (input.key === 'l') {
21562156+ publish('peek://system/', PubSubScopes.GLOBAL, 'page:show-navbar', { windowId: win.id });
21572157+ event.preventDefault();
21582158+ }
21592159+ });
2148216021492161 guestWebContents.setWindowOpenHandler(({ url: popupUrl }) => {
21502162 if (popupUrl.startsWith('http://') || popupUrl.startsWith('https://')) {
···22792291 // Add escape key handler to all windows
22802292 addEscHandler(win);
2281229322822282- // Add Cmd+L shortcut for web pages to show nav bar
22832283- // Web pages are now loaded inside peek://page container which handles nav
22942294+ // Add Cmd+L shortcut on the HOST webContents as a fallback.
22952295+ // The primary Cmd+L handler is on the webview guest (added via did-attach-webview above).
22962296+ // This host-level handler fires when the page container's own DOM has focus (rare,
22972297+ // but possible before the webview loads or if the user clicks outside the webview).
22842298 if (url.startsWith('http://') || url.startsWith('https://')) {
22852299 win.webContents.on('before-input-event', (event, input) => {
22862300 if (input.type !== 'keyDown' || !input.meta) return;
22872301 if (input.key === 'l') {
22882288- // Show the page container's nav bar
22892302 publish('peek://system/', PubSubScopes.GLOBAL, 'page:show-navbar', { windowId: win.id });
22902303 event.preventDefault();
22912304 }