mirror of
https://github.com/home-assistant/frontend
synced 2024-10-05 22:05:30 +02:00
Fix iOS close more info dialog issue
This commit is contained in:
parent
1c82a53631
commit
2565ca8e35
@ -63,6 +63,13 @@ export default new Polymer({
|
|||||||
value: false,
|
value: false,
|
||||||
observer: 'dialogOpenChanged',
|
observer: 'dialogOpenChanged',
|
||||||
},
|
},
|
||||||
|
|
||||||
|
_boundOnBackdropTap: {
|
||||||
|
type: Function,
|
||||||
|
value: function bindBackdropTap() {
|
||||||
|
return this._onBackdropTap.bind(this);
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
fetchHistoryData() {
|
fetchHistoryData() {
|
||||||
@ -93,8 +100,17 @@ export default new Polymer({
|
|||||||
},
|
},
|
||||||
|
|
||||||
dialogOpenChanged(newVal) {
|
dialogOpenChanged(newVal) {
|
||||||
if (!newVal && this.stateObj) {
|
if (newVal) {
|
||||||
|
this.$.dialog.backdropElement.addEventListener('click',
|
||||||
|
this._boundOnBackdropTap);
|
||||||
|
} else if (!newVal && this.stateObj) {
|
||||||
moreInfoActions.deselectEntity();
|
moreInfoActions.deselectEntity();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
_onBackdropTap() {
|
||||||
|
this.$.dialog.backdropElement.removeEventListener('click',
|
||||||
|
this._boundOnBackdropTap);
|
||||||
|
this.dialogOpen = false;
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user