Skip to content

Commit

Permalink
Merge pull request #474 from nyaruka/dropdown-pointer-events
Browse files Browse the repository at this point in the history
Use zero height instead of pointer-events for dropdowns
  • Loading branch information
ericnewcomer authored Jan 30, 2025
2 parents ad833f6 + 4ba0421 commit 8e0587c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/dropdown/Dropdown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ export class Dropdown extends RapidElement {
}
.dropdown.dormant {
pointer-events: none;
height: 0;
overflow: hidden;
}
.dropdown {
Expand Down Expand Up @@ -63,7 +64,6 @@ export class Dropdown extends RapidElement {
.open .dropdown {
opacity: 1;
pointer-events: auto;
transform: translateY(0.5em) scale(1);
}
Expand Down
7 changes: 7 additions & 0 deletions src/list/TembaMenu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -647,6 +647,13 @@ export class TembaMenu extends ResizeElement {
padding: 0.4em 0.2em;
}
.level-0 temba-dropdown div[slot='dropdown'] .icon-wrapper {
padding: 0em !important;
align-self: center;
margin-right: 0.4em;
margin-left: 0.4em;
}
temba-workspace-select {
margin: 0.2em;
display: block;
Expand Down
3 changes: 0 additions & 3 deletions src/select/Select.ts
Original file line number Diff line number Diff line change
Expand Up @@ -804,9 +804,6 @@ export class Select<T extends SelectOption> extends FormElement {
}

public handleOptionSelection(event: CustomEvent) {
event.preventDefault();
event.stopPropagation();

const selected = event.detail.selected;
// check if we should post it
if (selected.post && this.endpoint) {
Expand Down

0 comments on commit 8e0587c

Please sign in to comment.