Skip to content

Commit de48cb0

Browse files
jonocrbuddhajjigaexkevinparkwilliamdyoonMadinventorZero
committed
Validate shorcut for enter key
Co-authored-by: buddhajjigae <[email protected]> Co-authored-by: xkevinpark <[email protected]> Co-authored-by: williamdyoon <[email protected]> Co-authored-by: MadinventorZero <[email protected]>
1 parent 0a13034 commit de48cb0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/src/components/left/HTMLPanel.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ const HTMLPanel = (props): JSX.Element => {
142142
};
143143

144144
const handleCreateElement = useCallback((e) => {
145-
if(e.key === 'Enter') {
145+
if(e.key === 'Enter' && e.target.tagName !== "TEXTAREA") {
146146
e.preventDefault();
147147
document.getElementById('submitButton').click();
148148
}

0 commit comments

Comments
 (0)