Skip to content

Commit

Permalink
fixup! add dropdown primitive
Browse files Browse the repository at this point in the history
  • Loading branch information
amk221 committed Dec 9, 2024
1 parent f03b6dc commit f600400
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions addon/components/dropdown/index.gjs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export default class Dropdown extends Component {

@action
handleMouseDown(event) {
this.lastMouseDownElement = event.target;
this.lastMouseDownElement = this._isInside(event.target) && event.target;
}

@action
Expand Down Expand Up @@ -155,6 +155,8 @@ export default class Dropdown extends Component {
return;
}

console.log(reason);

this._isOpen = false;

scheduleOnce('afterRender', this, '_handleClosed', reason);
Expand Down Expand Up @@ -198,10 +200,6 @@ export default class Dropdown extends Component {
);
}

_isInsideContent(element) {
return this.contentElement?.contains(element);
}

_handleOpened() {
this.args.onOpenClosure?.();
this.args.onOpen?.();
Expand Down

0 comments on commit f600400

Please sign in to comment.