Skip to content

Commit 7bbb355

Browse files
committed
Fix dropdown toggle logic to prevent closing the menu when clicking the button
1 parent c518184 commit 7bbb355

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

‎packages/ui/src/components/editor/panel/Dropdown/Dropdown.tsx‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,12 @@ export const Dropdown = <T extends string>(props: Dropdown.Props<T>) => {
2929
)
3030

3131
const handle_toggle = () => {
32-
if (!is_open) {
33-
set_just_opened(true)
32+
// if dropdown is open, clicking it should not close it
33+
if (is_open) {
34+
return
3435
}
35-
set_is_open(!is_open)
36+
set_is_open(true)
37+
set_just_opened(true)
3638
}
3739

3840
const handle_select = (value: T) => {

‎packages/vscode/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "gemini-coder",
33
"displayName": "Code Web Chat",
44
"description": "AI coding without agents (CWC)",
5-
"version": "1.548.0",
5+
"version": "1.549.0",
66
"scripts": {
77
"build": "npx vsce package --no-dependencies",
88
"vscode:prepublish": "rimraf out && npm run compile",

0 commit comments

Comments
 (0)