mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
Need to do some checks to ensure we aren't taking over input elements, and are focused on the canvas. Closes #5478
8 lines
205 B
TypeScript
8 lines
205 B
TypeScript
export const isInputElement = (el: HTMLElement) => {
|
|
return (
|
|
el.tagName.toLowerCase() === 'input' ||
|
|
el.tagName.toLowerCase() === 'textarea' ||
|
|
el.tagName.toLowerCase() === 'select'
|
|
);
|
|
};
|