Skip to content

Commit

Permalink
feat(h5): browser forward / back hide map #4255
Browse files Browse the repository at this point in the history
  • Loading branch information
ZakaryCode committed Sep 24, 2019
1 parent 08d0a3c commit 9c4ad12
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/taro-h5/src/api/location/chooseLocation.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,13 @@ class LocationChooser extends Taro.Component {
constructor (props, context) {
super(props, context)
locationChooser = this
window.addEventListener('popstate', this.onBack)
}

componentWillUnmount () {
window.removeEventListener('popstate', this.onBack)
}

getWrapRef = ref => {
if (ref) this.wrapRef = ref
}
Expand Down

0 comments on commit 9c4ad12

Please sign in to comment.