mirror of
https://github.com/storytold/storyteller-bevy.git
synced 2026-10-28 08:58:07 +00:00
Respect the autoClose property
This commit is contained in:
@@ -204,7 +204,7 @@ export class AppElement extends LitElement {
|
|||||||
<!-- Studio-mode-only elements -->
|
<!-- Studio-mode-only elements -->
|
||||||
${this.#params.mode === StudioMode.Editor ? html`
|
${this.#params.mode === StudioMode.Editor ? html`
|
||||||
<!-- TODO: Move this -->
|
<!-- TODO: Move this -->
|
||||||
<sts-menu .trigger=${this.#addToSceneButtonRef}>
|
<sts-menu autoClose .trigger=${this.#addToSceneButtonRef}>
|
||||||
<sts-button
|
<sts-button
|
||||||
role="menuitem"
|
role="menuitem"
|
||||||
icon="cube"
|
icon="cube"
|
||||||
|
|||||||
@@ -81,7 +81,8 @@ export class MenuElement extends LitElement {
|
|||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
|
|
||||||
if (
|
if (
|
||||||
event.target
|
this.autoClose
|
||||||
|
&& event.target
|
||||||
&& event.target instanceof HTMLElement
|
&& event.target instanceof HTMLElement
|
||||||
&& event.target.role === "menuitem"
|
&& event.target.role === "menuitem"
|
||||||
) {
|
) {
|
||||||
|
|||||||
Reference in New Issue
Block a user