Skip to content

Commit

Permalink
Fix "Enter" on dropdown to match mouse click behaviour (#10375)
Browse files Browse the repository at this point in the history
  • Loading branch information
microbit-robert authored Feb 7, 2025
1 parent 7d35ec1 commit f60e827
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion webapp/src/sui.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,9 @@ export class DropdownMenu extends UIElement<DropdownProps, DropdownState> {
if (activeChild) {
activeChild.click();
} else {
this.toggle(true);
if (!this.props.onClick || this.props.onClick()) {
this.toggle(true);
}
}
} else if (activeElementIndex === children.length - 1 && !e.shiftKey && charCode === core.TAB_KEY) {
if (activeChild) {
Expand Down

0 comments on commit f60e827

Please sign in to comment.