mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-25 18:26:35 +00:00
Only use tagname for shortcut filter (#15273)
This commit is contained in:
parent
41420c3af3
commit
c1ed00a3f1
@ -2,7 +2,6 @@ import type { PropertyValues } from "lit";
|
|||||||
import tinykeys from "tinykeys";
|
import tinykeys from "tinykeys";
|
||||||
import { isComponentLoaded } from "../common/config/is_component_loaded";
|
import { isComponentLoaded } from "../common/config/is_component_loaded";
|
||||||
import { mainWindow } from "../common/dom/get_main_window";
|
import { mainWindow } from "../common/dom/get_main_window";
|
||||||
import { HaSelect } from "../components/ha-select";
|
|
||||||
import {
|
import {
|
||||||
QuickBarParams,
|
QuickBarParams,
|
||||||
showQuickBar,
|
showQuickBar,
|
||||||
@ -134,20 +133,17 @@ export default <T extends Constructor<HassElement>>(superClass: T) =>
|
|||||||
}
|
}
|
||||||
|
|
||||||
private _canOverrideAlphanumericInput(e: KeyboardEvent) {
|
private _canOverrideAlphanumericInput(e: KeyboardEvent) {
|
||||||
const el = e.composedPath()[0];
|
const el = e.composedPath()[0] as Element;
|
||||||
|
|
||||||
if (el instanceof HTMLTextAreaElement) {
|
if (el.tagName === "TEXTAREA") {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (el instanceof Element && el.parentElement instanceof HaSelect) {
|
if (el.parentElement?.tagName === "HA-SELECT") {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (
|
if (el.tagName !== "INPUT") {
|
||||||
(el as Element).tagName !== "INPUT" &&
|
|
||||||
!(el instanceof HTMLInputElement)
|
|
||||||
) {
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user