Merge pull request #63 from Kingsrook/feature/CE-938-order-release-automation

CE-938: fixed issue where modal record query was accepting shortcut k…
This commit is contained in:
tim-chamberlain
2024-06-05 10:49:23 -05:00
committed by GitHub

View File

@ -631,7 +631,7 @@ const RecordQuery = forwardRef(({table, usage, isModal, allowVariables, initialQ
const type = (e.target as any).type; const type = (e.target as any).type;
const validType = (type !== "text" && type !== "textarea" && type !== "input" && type !== "search"); const validType = (type !== "text" && type !== "textarea" && type !== "input" && type !== "search");
if (validType && !dotMenuOpen && !keyboardHelpOpen && !activeModalProcess) if (validType && !isModal && !dotMenuOpen && !keyboardHelpOpen && !activeModalProcess)
{ {
if (!e.metaKey && !e.ctrlKey && e.key === "n" && table.capabilities.has(Capability.TABLE_INSERT) && table.insertPermission) if (!e.metaKey && !e.ctrlKey && e.key === "n" && table.capabilities.has(Capability.TABLE_INSERT) && table.insertPermission)
{ {
@ -669,7 +669,7 @@ const RecordQuery = forwardRef(({table, usage, isModal, allowVariables, initialQ
{ {
document.removeEventListener("keydown", down); document.removeEventListener("keydown", down);
}; };
}, [dotMenuOpen, keyboardHelpOpen, metaData, activeModalProcess]); }, [isModal, dotMenuOpen, keyboardHelpOpen, metaData, activeModalProcess]);
/******************************************************************************* /*******************************************************************************