Add stopPropagation to move click handlers (#10379)

This commit is contained in:
Nathan Orick 2021-10-25 11:08:30 -04:00 committed by GitHub
parent 0c038398aa
commit d027ec0018
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -713,7 +713,8 @@ class HUIRoot extends LitElement {
}); });
} }
private _moveViewLeft() { private _moveViewLeft(ev) {
ev.stopPropagation();
if (this._curView === 0) { if (this._curView === 0) {
return; return;
} }
@ -724,7 +725,8 @@ class HUIRoot extends LitElement {
lovelace.saveConfig(swapView(lovelace.config, oldIndex, newIndex)); lovelace.saveConfig(swapView(lovelace.config, oldIndex, newIndex));
} }
private _moveViewRight() { private _moveViewRight(ev) {
ev.stopPropagation();
if ((this._curView! as number) + 1 === this.lovelace!.config.views.length) { if ((this._curView! as number) + 1 === this.lovelace!.config.views.length) {
return; return;
} }