mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-22 16:56:35 +00:00
Fix event propagation in generic entity row (#25134)
This commit is contained in:
parent
5a34560381
commit
a70a0d4b4a
@ -4,7 +4,6 @@ import { customElement, property } from "lit/decorators";
|
||||
import { classMap } from "lit/directives/class-map";
|
||||
import { ifDefined } from "lit/directives/if-defined";
|
||||
import { DOMAINS_INPUT_ROW } from "../../../common/const";
|
||||
import { stopPropagation } from "../../../common/dom/stop_propagation";
|
||||
import { toggleAttribute } from "../../../common/dom/toggle_attribute";
|
||||
import { computeDomain } from "../../../common/entity/compute_domain";
|
||||
import { computeStateName } from "../../../common/entity/compute_state_name";
|
||||
@ -17,6 +16,7 @@ import { actionHandler } from "../common/directives/action-handler-directive";
|
||||
import { handleAction } from "../common/handle-action";
|
||||
import { hasAction, hasAnyAction } from "../common/has-action";
|
||||
import { createEntityNotFoundWarning } from "./hui-warning";
|
||||
import { stopPropagation } from "../../../common/dom/stop_propagation";
|
||||
|
||||
@customElement("hui-generic-entity-row")
|
||||
export class HuiGenericEntityRow extends LitElement {
|
||||
@ -158,7 +158,12 @@ export class HuiGenericEntityRow extends LitElement {
|
||||
<div class="state"><slot></slot></div>
|
||||
</div>
|
||||
`
|
||||
: html`<slot @action=${stopPropagation}></slot>`}
|
||||
: html`<slot
|
||||
@touchcancel=${stopPropagation}
|
||||
@touchend=${stopPropagation}
|
||||
@keydown=${stopPropagation}
|
||||
@click=${stopPropagation}
|
||||
></slot>`}
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user