Capacitor add additional back button event while keeping default behaviour #13756
Replies: 1 comment
-
Unfortunately, this is not possible when the Quasar back button handling is turned on (via Currently, Quasar's support for the Capacitor Back button is quite rudimentary and does not allow finer tuning. For example, I have a wizard implemented via QStepper in QDialog and I want to use the Back button for navigating back in the stepper. Not possible. Adding my own listener for back button also hides the dialog (both mine and Quasar's listeners execute on the back button hit). The only way to achieve fine grained control (currently) is to disable Quasar's back button handling altogether and implement it yourself in your app, keeping track of the handlers you register, so that you can control what happens on back button hit. |
Beta Was this translation helpful? Give feedback.
-
Hello,
I was wondering if it is possible to get the backbutton event, emitted when running inside capacitor, in addition to keeping the quasar functionality of handling the navigation?
I had a quick look at the source code and found a history.js file where the respective capacitor event listener seems to be initialized but I cant figure out how to "highcheck" this event without removing the default backHandler functionality.
What I basically want is to e.g., additionally register a global event using tiny emitter that gets triggered each time the backbutton is pressed, so I can do some custom stuff, while not messing with the whole app closing/dialog closing behaviour that quasar already handles perfectly.
Thanks for any help!
Beta Was this translation helpful? Give feedback.
All reactions