Respect the autoClose property

This commit is contained in:
Danny McGee
2024-03-06 21:31:34 -05:00
parent 976e446f93
commit a2c4c9eaac
2 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -204,7 +204,7 @@ export class AppElement extends LitElement {
<!-- Studio-mode-only elements -->
${this.#params.mode === StudioMode.Editor ? html`
<!-- TODO: Move this -->
<sts-menu .trigger=${this.#addToSceneButtonRef}>
<sts-menu autoClose .trigger=${this.#addToSceneButtonRef}>
<sts-button
role="menuitem"
icon="cube"
+2 -1
View File
@@ -81,7 +81,8 @@ export class MenuElement extends LitElement {
event.stopPropagation();
if (
event.target
this.autoClose
&& event.target
&& event.target instanceof HTMLElement
&& event.target.role === "menuitem"
) {