1
mirror of https://github.com/home-assistant/frontend synced 2024-09-28 00:43:28 +02:00

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) {
return;
}
@ -724,7 +725,8 @@ class HUIRoot extends LitElement {
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) {
return;
}