Fixes invoke hotkey not working in input fields

This commit is contained in:
psychedelicious 2022-11-24 13:18:12 +11:00 committed by blessedcoolant
parent a7f11a8c09
commit fcd3ef1f98

View File

@ -27,9 +27,12 @@ export default function InvokeButton(props: InvokeButton) {
useHotkeys(
['ctrl+enter', 'meta+enter'],
() => {
if (isReady) {
dispatch(generateImage(activeTabName));
}
},
{
enabled: () => isReady,
preventDefault: true,
enableOnFormTags: ['input', 'textarea', 'select'],
},
[isReady, activeTabName]
);