Closed Bug 1652980 Opened 6 years ago Closed 6 years ago

Can't click buttons after opening bugzilla via window.open

Categories

(bugzilla.mozilla.org :: User Interface, defect)

defect

Tracking

()

RESOLVED INVALID

People

(Reporter: wlach, Unassigned)

Details

Test case:

Go to: https://alpha.iodide.io/notebooks/4874/

Run the notebook, then type "1234" in the bugzilla frame.

Expected:

bugzilla looks up bug '1234'

Actual:

nothing happens, no console error, no nothing

--

One possible explanation is that iodide's code execution happens in an iframe (https://iodide-project.github.io/docs/server-admin-overview/) -- a similar test case with codepen (which I'm guessing doesn't use an iframe) works fine: https://codepen.io/wlach/pen/KKVxbyV -- however, I see no reason why opening a new tab/window inside an iframe would be forbidden based on my read of these docs: https://developer.mozilla.org/en-US/docs/Web/API/Window/open

This is reproducible in both Firefox and Chrome

This looks like an issue with sandboxing of the iframe, not Bugzilla .

https://drop.glob.com.au/landfill/iframe-test/

index.html:

normal:
<iframe src="iframe.html"></iframe>
sandbox:
<iframe src="iframe.html" sandbox="allow-scripts allow-same-origin allow-modals allow-popups"></iframe>

iframe.html:

<button onclick="window.open('https://bugzilla-dev.allizom.org/home')">go</button>

The tab opened from the first iframe without sandboxing works without issue, the second doesn't allow form submission.

I don't know why things aren't working, especially since there's nothing in the logs. Maybe a Firefox security engineer can shed some light on what's going on. But from a Bugzilla perspective there's not much we can do.

Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → INVALID

Asked about this on #firefox on Slack. This is actually due to sandboxing behaviour of iframes, which applies to windows opened by them (whether via window.open or a link with an href. Kind of confusing, but makes sense. Apparently I can fix this on the iodide end with this directive on the iframe:

https://googlechrome.github.io/samples/allow-popups-to-escape-sandbox/

Can this be marked as resolved then?

Flags: needinfo?(wlachance)

(In reply to Emma Humphries, Bugmaster ☕️🎸🧞‍♀️✨ (she/they) [:emceeaich] (UTC-8) needinfo? me from comment #3)

Can this be marked as resolved then?

Yup! Glob already did. :)

Flags: needinfo?(wlachance)
You need to log in before you can comment on or make changes to this bug.