ionic-team / ionic-team/ionic-framework
bug: CloseWatcher API Prevents Navigation When No Overlays Are Present in Chromium v126
- Dominant language
- TypeScript
- Stars
- 52.7k
- Forks
- 13.3k
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 51
Description
### Prerequisites
- [X] I have read the [Contributing Guidelines](https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#creating-an-issue).
- [X] I agree to follow the [Code of Conduct](https://ionicframework.com/code-of-conduct).
- [X] I have searched for [existing issues](https://github.com/ionic-team/ionic-framework/issues) that already report this problem, without success.
### Ionic Framework Version
v8.x
### Current Behavior
Hello,
I recently noticed that the CloseWatcher API, which had been removed, is now back in Chromium version 126. After testing this feature, I found it to be working very well overall. However, I encountered an issue:
When no overlays are present on the page, I am unable to navigate back to the previous page. This seems to be a bug.
Could you please look into this issue? Thank you for your assistance.
### Expected Behavior
The CloseWatcher API should only be active when overlays are present, allowing normal navigation when there are no overlays.
### Steps to Reproduce
1- Clone the repository and navigate to the project directory.
2- Enable `experimentalCloseWatcher` option.
3- Run the command `npm run start` to start the application.
4- Open a mobile browser and navigate to any page with overlays, such as `src/components/modal`.
5- Close all overlays.
6- Try to navigate back to the previous page using the back button on your mobile device.
### Code Reproduction URL
#
### Ionic Info
v8.2.2
Android Chrome v126
### Additional Information
_No response_
Contributor guide
Research direction
Start with the experimentalCloseWatcher option and the src/components/modal reproduction described in the issue; run npm run start and reproduce the behavior in Android Chrome v126 after closing all overlays. Trace how CloseWatcher handles the back action when no overlays remain. Done means normal back navigation works without overlays while overlay closing still works.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100