@optionfactory/ful 7.0.0 → 7.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/ful.mjs CHANGED
@@ -2205,11 +2205,12 @@ class Dropdown extends ParsedElement {
2205
2205
  this.#menu = fragment.querySelector("menu");
2206
2206
  this.#menu.addEventListener('click', evt => {
2207
2207
  evt.stopPropagation();
2208
- if (!evt.target.matches('li')) {
2208
+ const li = evt.target.closest('li');
2209
+ if (!li) {
2209
2210
  this.hide();
2210
2211
  return;
2211
2212
  }
2212
- this.#change(evt.target);
2213
+ this.#change(li);
2213
2214
  });
2214
2215
  this.replaceChildren(fragment);
2215
2216
  }