Skip to content

Commit 0790259

Browse files
fix: stop click propagation on attribute modal option selection
Clicking an option in the Select Attribute modal was bubbling up to the parent BrowserWindow div's handleClick handler, which could re-trigger element selection logic and require a second click to actually close the modal. Adding e.stopPropagation() to the button's onClick prevents the event from reaching the parent handler. Fixes #623
1 parent 29a0dad commit 0790259

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/components/browser/BrowserWindow.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1647,7 +1647,8 @@ export const BrowserWindow = () => {
16471647
variant="outlined"
16481648
size="medium"
16491649
key={option.value}
1650-
onClick={() => {
1650+
onClick={(e) => {
1651+
e.stopPropagation();
16511652
handleAttributeSelection(option.value);
16521653
}}
16531654
style={{

0 commit comments

Comments
 (0)