You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This API allows listening for escape key presses, along with more platform specific close signals such as Android's back button/ gesture. This would provide a more native feel (matching both the native platform and the web).
It would also improve accesibility as it supports Talkback back gestures too.
Describe Preferred Solution
The close watcher API being used when supported feels like the best solution.
The feature is added behind an experimentalCloseWatcher flag in the IonicConfig, so you will need to set experimentalCloseWatcher: true before you can use it. Once enabled, you will be able to use this API to dismiss overlays, menus, and navigate in a non-Cordova/non-Capacitor environment on supported browsers (Chrome 120+ as of writing).
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.
Activity
liamdebeasi commentedon Dec 14, 2023
Thanks, I think this would be good for us to support. I have an experimental version if you want to give it a try:
Angular
React
Vue
Stencil/Vanilla JavaScript
The feature is added behind an
experimentalCloseWatcherflag in the IonicConfig, so you will need to setexperimentalCloseWatcher: truebefore you can use it. Once enabled, you will be able to use this API to dismiss overlays, menus, and navigate in a non-Cordova/non-Capacitor environment on supported browsers (Chrome 120+ as of writing).feat: add experimental hardware back button support in browsers (#28705)
liamdebeasi commentedon Jan 5, 2024
Thanks for the issue. This has been resolved via #28705, and the feature will be available in an upcoming release of Ionic Framework.
feat: add experimental hardware back button support in browsers (#28705)
ionitron-bot commentedon Feb 4, 2024
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.