Files
CC-Switch/src/utils/domUtils.ts
T
YoVinchen 8f1ad6e057 feat: improve app visibility settings and keyboard shortcuts
- Add ESC key navigation: return to previous view from full-screen panels
- Sync tray menu with app visibility settings (hide disabled apps)
- Add fnm (fast node manager) path support for CLI version scanning
- Fix useModelState being overwritten when user is editing model fields
- Fix EditProviderDialog showing stale data after save and reopen
- Refactor AppSwitcher to use loop instead of repetitive buttons
- Extract ToggleRow as reusable UI component
- Add domUtils for checking text-editable elements
2026-01-20 21:53:47 +08:00

12 lines
297 B
TypeScript

export function isTextEditableTarget(target: EventTarget | null): boolean {
if (!(target instanceof HTMLElement)) return false;
const tagName = target.tagName;
return (
tagName === "INPUT" ||
tagName === "TEXTAREA" ||
tagName === "SELECT" ||
target.isContentEditable
);
}