From 8482e7c76abd187fc5e6b00765d6f4cf19878251 Mon Sep 17 00:00:00 2001 From: 4gray Date: Sun, 14 Dec 2025 16:29:01 +0100 Subject: [PATCH 1/3] style: remove redundant light-theme CSS block from playlist item Delete an unnecessary media query that set `.meta` color for the light color scheme in the recent-playlists playlist-item stylesheet. The rule duplicated default styling and added extra specificity, so removing it simplifies the CSS and avoids redundant overrides. This reduces stylesheet size and potential maintenance confusion while preserving visual behaviour across themes. --- .../playlist-item/playlist-item.component.scss | 7 ------- 1 file changed, 7 deletions(-) diff --git a/libs/ui/components/src/lib/recent-playlists/playlist-item/playlist-item.component.scss b/libs/ui/components/src/lib/recent-playlists/playlist-item/playlist-item.component.scss index d6277ee91..bfb2026a0 100644 --- a/libs/ui/components/src/lib/recent-playlists/playlist-item/playlist-item.component.scss +++ b/libs/ui/components/src/lib/recent-playlists/playlist-item/playlist-item.component.scss @@ -26,13 +26,6 @@ mat-list-item { margin-top: 2px !important; } -// Light theme -@media (prefers-color-scheme: light) { - .meta { - color: rgba(0, 0, 0, 0.6); - } -} - .cdk-drag-preview { box-sizing: border-box; border-radius: 12px; From c2c06a99be578f5995a6e5fa3131e2b0358191fe Mon Sep 17 00:00:00 2001 From: 4gray Date: Sun, 14 Dec 2025 16:29:41 +0100 Subject: [PATCH 2/3] fix(video-player): ignore hotkeys when typing in search input Prevent global hotkeys from triggering while the user is typing in input or textarea fields. Add a private isTypingInInput(event) helper and short-circuit key handlers (info key and digit keys) to return early when the event target is an input or textarea. This avoids interfering with normal text entry (e.g., entering numbers in forms) and prevents accidental overlay toggles or channel changes while the user is focused on a form field. --- .../video-player/video-player.component.ts | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/apps/web/src/app/home/video-player/video-player.component.ts b/apps/web/src/app/home/video-player/video-player.component.ts index 5ce337d7e..a7327012f 100644 --- a/apps/web/src/app/home/video-player/video-player.component.ts +++ b/apps/web/src/app/home/video-player/video-player.component.ts @@ -368,6 +368,10 @@ export class VideoPlayerComponent implements OnInit { */ @HostListener('document:keydown.i', ['$event']) handleInfoKeyPress(event: Event): void { + // Don't trigger hotkeys when user is typing in input fields + if (this.isTypingInInput(event)) { + return; + } // Prevent default behavior and show info overlay event.preventDefault(); this.toggleInfoOverlay(); @@ -380,6 +384,10 @@ export class VideoPlayerComponent implements OnInit { handleKeyPress(event: KeyboardEvent): void { // Only handle digit keys (0-9) if (event.key >= '0' && event.key <= '9') { + // Don't trigger hotkeys when user is typing in input fields + if (this.isTypingInInput(event)) { + return; + } event.preventDefault(); this.handleChannelNumberInput(event.key); } @@ -453,4 +461,17 @@ export class VideoPlayerComponent implements OnInit { this.channelNumberTimeout = undefined; } } + + /** + * Check if the user is currently typing in an input or textarea field + * @param event Keyboard event + * @returns true if the event target is an input or textarea element + */ + private isTypingInInput(event: Event): boolean { + const target = event.target; + return ( + target instanceof HTMLInputElement || + target instanceof HTMLTextAreaElement + ); + } } From a5685ef27d24d9c021b4fb3be93ee8ab47a2239d Mon Sep 17 00:00:00 2001 From: 4gray Date: Sun, 14 Dec 2025 17:11:12 +0100 Subject: [PATCH 3/3] feat(ui): re-enable input selection and add context menu Re-enable user selection for input and textarea elements so users can select and copy text in form fields. Add an Electron context menu handler that shows a focused edit menu only for recognized text input types or editable fields. The menu includes Cut, Copy, Paste and Select All and respects the editFlags to enable actions. This restores native editing UX in the renderer while avoiding global context menus elsewhere in the app. --- apps/electron-backend/src/app/app.ts | 39 +++++++++++++++++++++++++++- apps/web/src/styles.scss | 6 +++++ 2 files changed, 44 insertions(+), 1 deletion(-) diff --git a/apps/electron-backend/src/app/app.ts b/apps/electron-backend/src/app/app.ts index 7eae76a51..07e9d479c 100644 --- a/apps/electron-backend/src/app/app.ts +++ b/apps/electron-backend/src/app/app.ts @@ -1,4 +1,4 @@ -import { BrowserWindow, screen, shell } from 'electron'; +import { BrowserWindow, Menu, screen, shell } from 'electron'; import { join } from 'path'; import { environment } from '../environments/environment'; import { rendererAppName, rendererAppPort } from './constants'; @@ -115,6 +115,43 @@ export default class App { store.set(WINDOW_BOUNDS, App.mainWindow.getNormalBounds()); } }); + + // Enable context menu for input fields only + App.mainWindow.webContents.on('context-menu', (event, params) => { + const { isEditable, editFlags } = params; + + // Check if this is an editable field (input, textarea, contenteditable) + // editFlags.canPaste is a good indicator of an input field + if (isEditable && editFlags.canPaste) { + const menu = Menu.buildFromTemplate([ + { + label: 'Cut', + role: 'cut', + enabled: editFlags.canCut, + }, + { + label: 'Copy', + role: 'copy', + enabled: editFlags.canCopy, + }, + { + label: 'Paste', + role: 'paste', + enabled: editFlags.canPaste, + }, + { + type: 'separator', + }, + { + label: 'Select All', + role: 'selectAll', + enabled: editFlags.canSelectAll, + }, + ]); + + menu.popup(); + } + }); } private static loadMainWindow() { diff --git a/apps/web/src/styles.scss b/apps/web/src/styles.scss index 1ee747487..bf39f175d 100644 --- a/apps/web/src/styles.scss +++ b/apps/web/src/styles.scss @@ -23,6 +23,12 @@ html { font-family: Roboto, 'Helvetica Neue', sans-serif; } +// Re-enable context menu and text selection for input fields +input, +textarea { + user-select: text; +} + @media (display-mode: standalone) { body { overscroll-behavior-y: contain;