Closed ArnaudWeyts closed 4 months ago
@rootEventType
BasicDropdown
mousedown
I noticed that we set eventType to a default of mousedown for the ember-basic-dropdown trigger (see https://github.com/cibernox/ember-power-select/blob/3aec36878c8b2aa9cf335b7a2220ae448c359fa1/ember-power-select/src/components/power-select.hbs#L46C1-L46C47), but we don't set it for rootEventType, which is the event used when clicking outside of the dropdown to open/close. I believe these should be in sync and the default of mousedown makes sense (it's also how a default HTML select behaves).
eventType
ember-basic-dropdown
rootEventType
select
We ran into this issue because the click event doesn't propagate when the original element is removed from the DOM. Causing selects to not close properly.
Also opened an MR in ember-basic-dropdown to add missing docs: https://github.com/cibernox/ember-basic-dropdown/pull/903
Summary
@rootEventType
to be passed on toBasicDropdown
@rootEventType
tomousedown
Description
I noticed that we set
eventType
to a default ofmousedown
for theember-basic-dropdown
trigger (see https://github.com/cibernox/ember-power-select/blob/3aec36878c8b2aa9cf335b7a2220ae448c359fa1/ember-power-select/src/components/power-select.hbs#L46C1-L46C47), but we don't set it forrootEventType
, which is the event used when clicking outside of the dropdown to open/close. I believe these should be in sync and the default ofmousedown
makes sense (it's also how a default HTMLselect
behaves).We ran into this issue because the click event doesn't propagate when the original element is removed from the DOM. Causing selects to not close properly.