mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-24 09:46:36 +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 { isComponentLoaded } from "../common/config/is_component_loaded";
|
||||
import { mainWindow } from "../common/dom/get_main_window";
|
||||
import { HaSelect } from "../components/ha-select";
|
||||
import {
|
||||
QuickBarParams,
|
||||
showQuickBar,
|
||||
@ -134,20 +133,17 @@ export default <T extends Constructor<HassElement>>(superClass: T) =>
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
if (el instanceof Element && el.parentElement instanceof HaSelect) {
|
||||
if (el.parentElement?.tagName === "HA-SELECT") {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (
|
||||
(el as Element).tagName !== "INPUT" &&
|
||||
!(el instanceof HTMLInputElement)
|
||||
) {
|
||||
if (el.tagName !== "INPUT") {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user