mirror of
https://github.com/appwrite/console.git
synced 2026-06-06 19:27:48 +00:00
fix: prevent bubbling on enter
This commit is contained in:
1 parent
4ad585a38f
commit
96a331e2e6
1 file changed
+2
-1
@@ -1,5 +1,6 @@
|
||||
export function clickOnEnter(event: KeyboardEvent) {
|
||||
if (event.key === 'Enter') {
|
||||
if (event.key === 'Enter' && event.target === event.currentTarget) {
|
||||
event.preventDefault();
|
||||
(event.currentTarget as HTMLElement).click();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user