Skip to content

Commit 1e80a04

Browse files
committed
Expands non-interactive click detection to include VSCode elements
Enhances the non-interactive click listener by adding support for 'VSCODE-TEXT-AREA' and 'VSCODE-TEXT-FIELD' tags. This ensures that typing in VSCode-specific input elements is not disrupted by unintentional triggers. Not including these element was causing users not to be able to edit some input boxes on the settings page. This fixes that!
1 parent cf5f65f commit 1e80a04

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

webview-ui/src/components/ui/hooks/useNonInteractiveClick.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,10 @@ export function useAddNonInteractiveClickListener(handler: () => void) {
1616
// Don't trigger for input elements to avoid disrupting typing
1717
if (
1818
target.tagName !== "INPUT" &&
19-
target.tagName !== "TEXTAREA" &&
2019
target.tagName !== "SELECT" &&
20+
target.tagName !== "TEXTAREA" &&
21+
target.tagName !== "VSCODE-TEXT-AREA" &&
22+
target.tagName !== "VSCODE-TEXT-FIELD" &&
2123
!target.isContentEditable
2224
) {
2325
handler()

0 commit comments

Comments
 (0)