etodanik / ion-google-place

Ionic directive for a location dropdown that utilizes google maps
MIT License
251 stars 201 forks source link

Back button on android does not close #49

Open Tavorcl opened 9 years ago

Tavorcl commented 9 years ago

If i press the back button on Android (instead the cancel button), it does not close the screen. Instead, it goes back to the previous page, and the cancel button won't work either (and the screen will be freezed on the current screen).

I have been trying to fix this using the ionicPlatform functions (onHardwareBackButton, offHardwareBackButton, registerBackButtonAction), but i cannot achieve a function that is only valid when the modal is opened and destroyed when is closed.

Any idea?

Freundschaft commented 9 years ago

this line of code does not work for you? https://github.com/israelidanny/ion-google-place/blob/master/ion-google-place.js#L114