Page MenuHomePhabricator

Full-screen not working on mobile
Closed, ResolvedPublic1 Estimated Story PointsBUG REPORT

Description

Reported on Slack by @lwatson & @bvibber:

  • Firefox: fullscreen works in desktop and mobile views for both small and large devices.
  • Chrome: I attached a video of what happens when you select full screen using mobile view on mobile device. The controls, captions, VTOC is all lost.
  • Safari: I tested this on my iPhone and pressing the button doesn't trigger anything.

iirc native web fullscreen on ios is ipad only
so for iphones you have to emulate it in css, it's silly

Acceptance criteria

  • Clicking the <fullscreen> button in iOS actually opens the image full-screen

Requirement

Scope: Mobile web (iOS Safari and iOS Chrome).

  • Tapping the fullscreen button on iOS must open the image in fullscreen.
  • Since native fullscreen API is not supported on iPhone Safari, emulate fullscreen with CSS.
  • A clear exit control must be present so users can leave fullscreen (no reliance on Escape key).
  • Controls, captions, and VTOC must remain visible while in fullscreen.

BDD

Feature: Fullscreen functionality on iOS

  Scenario: Fullscreen on iOS Safari
    Given I am viewing an image in mobile view on iPhone Safari
    When I tap the fullscreen button
    Then the image is displayed fullscreen via CSS emulation
    And controls, captions, and VTOC remain visible
    And an exit control is available to close fullscreen

  Scenario: Fullscreen on iOS Chrome
    Given I am viewing an image in mobile view on iPhone Chrome
    When I tap the fullscreen button
    Then the image is displayed fullscreen via CSS emulation
    And controls, captions, and VTOC remain visible
    And an exit control is available to close fullscreen

Test Steps

Test Case 1: iOS Safari fullscreen

  1. Open an image in mobile view on iPhone Safari.
  2. Tap the fullscreen button.
  3. AC1: Image expands to fullscreen using CSS emulation.
  4. AC2: Controls, captions, and VTOC remain visible in fullscreen.
  5. AC3: An exit control (e.g., close button) is visible and functional.

Test Case 2: iOS Chrome fullscreen

  1. Open an image in mobile view on iPhone Chrome.
  2. Tap the fullscreen button.
  3. AC4: Image expands to fullscreen using CSS emulation.
  4. AC5: Controls, captions, and VTOC remain visible in fullscreen.
  5. AC6: An exit control (e.g., close button) is visible and functional.

QA Results - Patchdemo

Event Timeline

@JScherer-WMF I noticed the fullscreen button isn't working on iOS Safari and Chrome, which got me thinking about the mobile user experience.
While desktop users can easily exit fullscreen mode using the escape key, mobile/tablet users might struggle to exit fullscreen mode, potentially creating a frustrating experience. However, I could be missing something.

Is fullscreen functionality necessary on mobile devices? (If yes, then let's investigate and fix it. If not, then we can optionally disable this feature on mobile entirely.)

@JScherer-WMF I noticed the fullscreen button isn't working on iOS Safari and Chrome, which got me thinking about the mobile user experience.
While desktop users can easily exit fullscreen mode using the escape key, mobile/tablet users might struggle to exit fullscreen mode, potentially creating a frustrating experience. However, I could be missing something.

Is fullscreen functionality necessary on mobile devices? (If yes, then let's investigate and fix it. If not, then we can optionally disable this feature on mobile entirely.)

Full screen, including a way to get out of it, definitely required in mobile experiences. This is especially important given all the wild cropping we're doing.

Note that fullscreen won't help with seeing area outside the cropping at all. If we want to show that area we have to actually show it, not just crop.

Can we just make the fullscreen button toggle object-fit instead? It loads cropped (object-fit: cover) + caption, but toggles to uncropped (object-fit: contain) without caption? That’s essentially only adding a class to the container & 2 lines of CSS, and keeps controls simple and consistent (i.e. buttons remain and easy to go back to cropped mode)

Change #1189498 had a related patch set uploaded (by Matthias Mullie; author: Matthias Mullie):

[mediawiki/extensions/ReaderExperiments@master] Replace fullscreen toggle behaviour

https://gerrit.wikimedia.org/r/1189498

Test wiki created on Patch demo by Mmullie (WMF) using patch(es) linked to this task:
https://4c7a526edd.catalyst.wmcloud.org/w/

Note: above patch is technically ready, but is awaiting design input on the demo.
Discussion ongoing on Slack so I'll keep this in "doing" for now - I'll update/move this ticket based depending on the outcome.

Change #1189498 merged by jenkins-bot:

[mediawiki/extensions/ReaderExperiments@master] Replace fullscreen toggle behaviour

https://gerrit.wikimedia.org/r/1189498

This patchdemo instance can be used for QA:

https://30eaa87caa.catalyst.wmcloud.org/wiki/Paris

Note that we've also added a tooltip on this button (which will appear to the left).

HSwan-WMF set the point value for this task to 1.Sep 24 2025, 4:27 PM
Edtadros subscribed.

Test Result - Patchdemo

Status: ✅ PASS
Environment: Patchdemo (https://30eaa87caa.catalyst.wmcloud.org/wiki/Paris)
OS: iOS 18.0
Browser: Safari / Chrome (latest as of test date)
Device: iPhone 14 Pro
Emulated Device: NA

Test Case 1: iOS Safari fullscreen

  1. Open an image in mobile view on iPhone Safari.
  2. Tap the fullscreen button.
  3. ✅ AC1: Image expands to fullscreen using CSS emulation.
  4. ✅ AC2: Controls, captions, and VTOC remain visible in fullscreen.
  5. ✅ AC3: An exit control (e.g., close button) is visible and functional.

ScreenRecording_09-24-202515-34-26_1-ezgif.com-optimize.gif (400×869 px, 3 MB)

Test Case 2: iOS Chrome fullscreen

  1. Open an image in mobile view on iPhone Chrome.
  2. Tap the fullscreen button.
  3. ✅ AC4: Image expands to fullscreen using CSS emulation.
  4. ✅ AC5: Controls, captions, and VTOC remain visible in fullscreen.
  5. ✅ AC6: An exit control (e.g., close button) is visible and functional.

ScreenRecording_09-24-202515-37-47_1-ezgif.com-optimize.gif (400×869 px, 2 MB)

Edtadros updated the task description. (Show Details)

Test wiki on [[ | Patch demo ]] by Mmullie (WMF) using patch(es) linked to this task was deleted:

https://4c7a526edd.catalyst.wmcloud.org/w/

Test wiki on [[ | Patch demo ]] by Mmullie (WMF) using patch(es) linked to this task was deleted:

https://561a5d5247.catalyst.wmcloud.org/w/

Test wiki on [[ | Patch demo ]] by Mmullie (WMF) using patch(es) linked to this task was deleted:

https://78a66ef974.catalyst.wmcloud.org/w/

Test wiki on [[ | Patch demo ]] by Mmullie (WMF) using patch(es) linked to this task was deleted:

https://ba8618afa4.catalyst.wmcloud.org/w/

Test wiki on [[ | Patch demo ]] by Mmullie (WMF) using patch(es) linked to this task was deleted:

https://5135a98111.catalyst.wmcloud.org/w/

Test wiki on [[ | Patch demo ]] by Mmullie (WMF) using patch(es) linked to this task was deleted:

https://5fc0f36bbc.catalyst.wmcloud.org/w/

Test wiki on [[ | Patch demo ]] by Mmullie (WMF) using patch(es) linked to this task was deleted:

https://97d2d44553.catalyst.wmcloud.org/w/

Test wiki on [[ | Patch demo ]] by Mmullie (WMF) using patch(es) linked to this task was deleted:

https://14b24a64a7.catalyst.wmcloud.org/w/

Test wiki on Patch demo by Mmullie (WMF) using patch(es) linked to this task was deleted:

https://4c7a526edd.catalyst.wmcloud.org/w/