Skip to content

Commit

Permalink
fix: Unable to create a new line in description field with SHIFT+Enter
Browse files Browse the repository at this point in the history
  • Loading branch information
nkdengineer committed Sep 24, 2024
1 parent ae57639 commit 5e306c8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/Button/validateSubmitShortcut/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import type ValidateSubmitShortcut from './types';

const validateSubmitShortcut: ValidateSubmitShortcut = (isDisabled, isLoading, event) => {
const eventTarget = event?.target as HTMLElement;
if (isDisabled || isLoading || eventTarget.nodeName === 'TEXTAREA') {
if (isDisabled || isLoading || eventTarget.nodeName === 'TEXTAREA' || (eventTarget?.contentEditable === 'true' && eventTarget.ariaMultiLine)) {
return false;
}

Expand Down

0 comments on commit 5e306c8

Please sign in to comment.