From 054aea45ee6cfee82dc2faf2836779642819234a Mon Sep 17 00:00:00 2001 From: Curt Grimes Date: Tue, 7 May 2024 11:27:19 -0500 Subject: [PATCH] fix(VMenu): allow enter keypress to work in textareas Previously, when a `` with `:close-on-content-click="false"` contained a textarea, an enter press inside the textarea would do nothing and not produce a new line. Now, it will allow a new line to be typed into the textarea when pressing enter. This last worked in Vuetify v3.5.14 and was broken starting in v3.5.15. The fix for #19519 in 85ba4a800 caused this issue. fixes #19767 --- packages/vuetify/src/components/VMenu/VMenu.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/vuetify/src/components/VMenu/VMenu.tsx b/packages/vuetify/src/components/VMenu/VMenu.tsx index 7ac262c0b47..02fcdad31a7 100644 --- a/packages/vuetify/src/components/VMenu/VMenu.tsx +++ b/packages/vuetify/src/components/VMenu/VMenu.tsx @@ -126,6 +126,7 @@ export const VMenu = genericComponent()({ if (props.disabled) return if (e.key === 'Tab' || (e.key === 'Enter' && !props.closeOnContentClick)) { + if (e.key === 'Enter' && e.target instanceof HTMLTextAreaElement) return if (e.key === 'Enter') e.preventDefault() const nextElement = getNextElement(