[Bug]: iOS margins broken after iframe goes fullscreen

Aperta
#8,054 15 commenti 8 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@theproducer ci sta già lavorando.

Dal 28/1/2026.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

platform: ios type: bug
Capacitor Version
gildas_gh@Mac capacitor-fullscreen-rotate % npx cap doctor
💊   Capacitor Doctor  💊

Latest Dependencies:

  @capacitor/cli: 7.4.1
  @capacitor/core: 7.4.1
  @capacitor/android: 7.4.1
  @capacitor/ios: 7.4.1

Installed Dependencies:

  @capacitor/cli: 7.4.1
  @capacitor/core: 7.4.1
  @capacitor/ios: 7.4.1
  @capacitor/android: 7.4.1

[success] iOS looking great! 👌
[success] Android looking great! 👌
Other API Details
Compiled using XCode 16.4 (16F6) 

Demo on iPhone 12, running iOS 18.5
Platforms Affected
  • iOS
  • Android
  • Web
Current Behavior

I am embedding an external video player with an iframe (in my example "Momindum" but it happens with Vimeo too)

I also have a header using safe-area-inset-top as top padding. This padding works when opening the app.

When you switch the embedded video to full screen, then rotate the screen, and finally exit full screen, the app margins are breaking.

It seems that after leaving full screen and rotating again the screen, safe-area-inset-top is now on the right side of the screen and it's doubled in size : one part is "inside" the web page (I mean can be controlled with HTML) and another is "outside" it (adding a red background to html and body don't cover it)

This bug happens when not rotating the screen too (part 2 of the video) : a white padding is added on top and bottom of the screen, outside <html> (html has a burlywood background in the demo)

https://github.com/user-attachments/assets/886e4bce-749e-458b-bc49-f790e5df3c46

Expected Behavior

When you leave full screen and turn the screen, the margins should return to the way they were before: the application should take up the full size of the screen, and the safe-area-inset-top should return to the top (vertical).

Project Reproduction

https://github.com/Gildas-GH/capacitor-fullscreen-rotate

Additional Information

No response

Lingua principale
TypeScript
Stelle
17.1k
Fork
1.3k
Merge medio
1g 22h
PR unite (30g)
26

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di ionic-team/capacitor

Tutte le issue di ionic-team/capacitor

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.