backbutton event not working using quasar dev in cordova mode with android 5.1
See original GitHub issueWhen using debug version(quasar dev -m cordova -T android) with an android 5.1 phone, I can not register backbutton event using following code
mounted () {
if (this.$q.platform.is.cordova) {
document.addEventListener('backbutton', this.onBackButton, false)
}
}
onBackButton method never get fired when I pressed the back button, but in quasar release version or change a phone with android 7.0, it’s ok.
Software version
Operating System Windows_NT(6.3.9600) - win32/x64 NodeJs 8.11.2
Global packages
NPM 5.6.0
yarn 1.7.0
quasar-cli 0.16.4
vue-cli 2.9.6
cordova 8.0.0
quasar-cli 0.16.4
quasar-framework 0.16.0
quasar-extras 2.0.2
vue 2.5.16
vue-router 3.0.1
vuex 3.0.1
What did you get as the error?
onBackButton method never get fired
What were you expecting?
onBackButton method should be triggered when I press back button
What steps did you take, to get the error?
- just using quasar starter kit
- add the backbutton event callback
- using quasar dev -m cordova -T android with an android 5.1 phone
Issue Analytics
- State:
- Created 5 years ago
- Comments:10 (4 by maintainers)
Its solved in 7827 issue.
@hawkeye64 Please check on
deviceready
event I have addeddeviceReady
function and onbackbutton
event I have addedonKeyDown
functionI don’t know what I’m missing. onKeyDown function is never being called cause there are no logs in the console
I guess you are confused with the function name
onKeyDown
, let’s change the function name toonBackButton