Firefox should allow a popup if "the task in which the algorithm is running was queued by an algorithm that was allowed to show a popup".

NEW
Unassigned

Status

()

Core
DOM: Events
3 years ago
3 years ago

People

(Reporter: Andy Earnshaw, Unassigned)

Tracking

37 Branch
x86
Mac OS X
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

3 years ago
Created attachment 8542191 [details]
is_allowed_popup_test.html

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.45 Safari/537.36

Steps to reproduce:

I discovered this issue whilst trying to set an iframe to full screen from an onmessage handler for the parent window.  I set up a simple page that detects a click on the body, posts a message to the window, whose handler opens a popup window or calls requestFullscreen() on the iframe element.



Actual results:

Firefox blocks the popup or denies the request for full screen even if postMessage() was called from an onclick handler.


Expected results:

The spec for requestFullscreen, at step 3[1], says:

> 3. If any of the following conditions are true, set error to true:
>  - The fullscreen element ready check for pending returns false.
>  - This algorithm is not allowed to show a popup.
>  - Fullscreen is not supported.

The second part, "this algorithm is not allowed to show a popup", links to the HTML Living Standard spec, which implies that the request for full screen should be allowed according to this point in a paragraph[2] in section 7.1.6:

> The task in which the algorithm is running was queued by an algorithm that was allowed to show a popup, and the chain of such algorithms started within a user-agent defined timeframe.

It seems that Firefox doesn't follow this algorithm for its popup blocking process, which mozRequestFullScreen appears to be using as required by the spec.

[1]: https://fullscreen.spec.whatwg.org/#dom-element-requestfullscreen
[2]: https://html.spec.whatwg.org/multipage/browsers.html#allowed-to-show-a-popup

Updated

3 years ago
Component: DOM → DOM: Events
Confirmed on 37.0a1 (2015-01-12) Win 7
Status: UNCONFIRMED → NEW
Ever confirmed: true
You need to log in before you can comment on or make changes to this bug.