Fix iOS close more info dialog issue

This commit is contained in:
Paulus Schoutsen 2015-08-29 10:08:20 -07:00
parent 1c82a53631
commit 2565ca8e35
1 changed files with 17 additions and 1 deletions

View File

@ -63,6 +63,13 @@ export default new Polymer({
value: false,
observer: 'dialogOpenChanged',
},
_boundOnBackdropTap: {
type: Function,
value: function bindBackdropTap() {
return this._onBackdropTap.bind(this);
},
},
},
fetchHistoryData() {
@ -93,8 +100,17 @@ export default new Polymer({
},
dialogOpenChanged(newVal) {
if (!newVal && this.stateObj) {
if (newVal) {
this.$.dialog.backdropElement.addEventListener('click',
this._boundOnBackdropTap);
} else if (!newVal && this.stateObj) {
moreInfoActions.deselectEntity();
}
},
_onBackdropTap() {
this.$.dialog.backdropElement.removeEventListener('click',
this._boundOnBackdropTap);
this.dialogOpen = false;
},
});