stopPropagation on automation moveUp/moveDown (#19804)

* stopPropagation on automation moveUp/moveDown

* also conditions and triggers
This commit is contained in:
karwosts 2024-02-15 04:04:40 -05:00 committed by GitHub
parent 8136cc8008
commit 84938ccc94
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 6 additions and 0 deletions

View File

@ -203,12 +203,14 @@ export default class HaAutomationAction extends LitElement {
}
private _moveUp(ev) {
ev.stopPropagation();
const index = (ev.target as any).index;
const newIndex = index - 1;
this._move(index, newIndex);
}
private _moveDown(ev) {
ev.stopPropagation();
const index = (ev.target as any).index;
const newIndex = index + 1;
this._move(index, newIndex);

View File

@ -227,12 +227,14 @@ export default class HaAutomationCondition extends LitElement {
}
private _moveUp(ev) {
ev.stopPropagation();
const index = (ev.target as any).index;
const newIndex = index - 1;
this._move(index, newIndex);
}
private _moveDown(ev) {
ev.stopPropagation();
const index = (ev.target as any).index;
const newIndex = index + 1;
this._move(index, newIndex);

View File

@ -180,12 +180,14 @@ export default class HaAutomationTrigger extends LitElement {
}
private _moveUp(ev) {
ev.stopPropagation();
const index = (ev.target as any).index;
const newIndex = index - 1;
this._move(index, newIndex);
}
private _moveDown(ev) {
ev.stopPropagation();
const index = (ev.target as any).index;
const newIndex = index + 1;
this._move(index, newIndex);