fix(ui): Prevent Command from triggering while a editable field has focus (#11254)
Resolves CMRC-909
This commit is contained in:
committed by
GitHub
parent
f07af7b93c
commit
3cf4307296
11
packages/design-system/ui/src/utils/is-input-element.ts
Normal file
11
packages/design-system/ui/src/utils/is-input-element.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
const isInputElement = (element: Element | null): boolean => {
|
||||
return (
|
||||
element instanceof HTMLElement &&
|
||||
(element.isContentEditable ||
|
||||
element.tagName === "INPUT" ||
|
||||
element.tagName === "TEXTAREA" ||
|
||||
element.tagName === "SELECT")
|
||||
)
|
||||
}
|
||||
|
||||
export { isInputElement }
|
||||
Reference in New Issue
Block a user