ionic-team / ionic-team/ionic-framework
bug: Exiting fullscreen via swipe down on iOS removes toolbar insets
- 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
When entering fullscreen mode via the browser fullscreen API on iOS, users can exit either by tapping the overlay (X) button or swiping down. If the user exits fullscreen by swiping down, the insets applied to the first toolbar are set to `0px`. This behavior does not occur when exiting fullscreen using the overlay button or through custom logic.
```
ion-header ion-toolbar:first-of-type {
padding-top: var(--ion-safe-area-top, 0);
}
```
### Expected Behavior
The insets should apply regardless how fullscreen mode was exited.
### Steps to Reproduce
1. Bring some element to fullscreen using the browser fullscreen API
2. Swipe down to exit fullscreen
### Code Reproduction URL
https://github.com/postmann/ionic-fullscreen/
### Ionic Info
```
Ionic:
Ionic CLI : 7.2.1 (/home/xxx/.nvm/versions/node/v20.18.0/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/react 8.5.7
Capacitor:
Capacitor CLI : 7.2.0
@capacitor/android : not installed
@capacitor/core : 7.2.0
@capacitor/ios : 7.2.0
Utility:
cordova-res : not installed globally
native-run : 2.0.1
System:
NodeJS : v20.18.0 (/home/xxx/.nvm/versions/node/v20.18.0/bin/node)
npm : 10.8.2
OS : Linux 5.15
```
### Additional Information
_No response_
Contributor guide
Research direction
Start with the fullscreen behavior shown in the reproduction URL and inspect how the first toolbar applies --ion-safe-area-top after the browser Fullscreen API exits on iOS. Reproduce the swipe-down exit, then verify that the inset remains applied as it does for the overlay-button and custom-logic paths.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ios, typescript
- Domain
- frontend, mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100