cant exit fullscreen programatically

RESOLVED FIXED in mozilla29

Status

()

RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: jorgejaramillo1, Assigned: emk)

Tracking

({APIchange, ue})

25 Branch
mozilla29
x86_64
Windows 7
APIchange, ue
Points:
---
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(3 attachments)

(Reporter)

Description

5 years ago
Created attachment 8345110 [details]
exit-fs-programatically.rar

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.63 Safari/537.36

Steps to reproduce:

I have a page where the user can exit fullscreen with button, or the application can exit fullscreen.
The application tries to exit fullscreen by calling cancelFullscreen.
In the example attached, the app can exit fullscreen by itself after 2 seconds of entering fullscreen.


Actual results:

The application calls the fullscreen API, but it is ignored.


Expected results:

firefox should exit fullscreen when the app requests it.
(Reporter)

Updated

5 years ago
Keywords: APIchange, ue
(Assignee)

Comment 1

5 years ago
According to the Fullscreen spec, exitFullscreen() doesn't check if the algorithm is allowed to show a popup.
Status: UNCONFIRMED → NEW
Component: Untriaged → DOM: Core & HTML
Ever confirmed: true
Product: Firefox → Core
(Assignee)

Comment 2

5 years ago
Created attachment 8345851 [details] [diff] [review]
bug948268_exitfullscreen

Do the obvious.
Attachment #8345851 - Flags: review?(cpearce)
(Assignee)

Comment 3

5 years ago
Created attachment 8346215 [details] [diff] [review]
Fixup the test

I'll fold this on landing.
Attachment #8346215 - Flags: review?(cpearce)
Comment on attachment 8345851 [details] [diff] [review]
bug948268_exitfullscreen

Review of attachment 8345851 [details] [diff] [review]:
-----------------------------------------------------------------

I think this is a good idea. This effect can already be achieved by removing the fullscreen element from the document; removing the fullscreen element from its document exits fullscreen.

This is also the behaviour that Chrome has, testcase: http://pearce.org.nz/f press "Toggle fullscreen" button, then "Delay cancel" button, Chrome exits fullscreen, we don't.

I would like to get more people to OK this though, so requesting feedback from Olli and Bz.
Attachment #8345851 - Flags: review?(cpearce)
Attachment #8345851 - Flags: review+
Attachment #8345851 - Flags: feedback?(bzbarsky)
Attachment #8345851 - Flags: feedback?(bugs)
Attachment #8346215 - Flags: review?(cpearce) → review+
So what happens if a web page enters and exits fullscreen in a loop?
(Assignee)

Comment 6

5 years ago
(In reply to Olli Pettay [:smaug] from comment #5)
> So what happens if a web page enters and exits fullscreen in a loop?

It's impossible because entering fullscreen still requires the privilege.
But if you do enterFullScreen(), exitFullScreen() in a loop.
We're handling user input so entering fullscreen should succeed.


(Just want to understand the behavior we get and what behavior we want.)
Comment on attachment 8345851 [details] [diff] [review]
bug948268_exitfullscreen

This seems fine to me, given that it doesn't actually add new capabilities given the element-removing setup...
Attachment #8345851 - Flags: feedback?(bzbarsky) → feedback+
(Assignee)

Comment 9

5 years ago
(In reply to Olli Pettay [:smaug] from comment #7)
> But if you do enterFullScreen(), exitFullScreen() in a loop.
> We're handling user input so entering fullscreen should succeed.
> 
> 
> (Just want to understand the behavior we get and what behavior we want.)

Currently exitFullScreen() will do the same check as enterFullScreen(). If enterFullScreen() succeeds for any reason, exitFullScreen() will also succeed. So this change will make nothing worse.
Comment on attachment 8345851 [details] [diff] [review]
bug948268_exitfullscreen

indeed
Attachment #8345851 - Flags: feedback?(bugs) → feedback+
(Assignee)

Updated

5 years ago
Assignee: nobody → VYV03354
Status: NEW → ASSIGNED
https://hg.mozilla.org/mozilla-central/rev/be5f5ca171f0
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla29
Duplicate of this bug: 867967
You need to log in before you can comment on or make changes to this bug.