This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 14471 - "An algorithm is allowed to show a pop-up if: ..." is not compatible with the implementations
Summary: "An algorithm is allowed to show a pop-up if: ..." is not compatible with the...
Status: RESOLVED FIXED
Alias: None
Product: HTML WG
Classification: Unclassified
Component: HTML5 spec (show other bugs)
Version: unspecified
Hardware: PC Linux
: P2 normal
Target Milestone: ---
Assignee: Ian 'Hixie' Hickson
QA Contact: HTML WG Bugzilla archive list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 14427
  Show dependency treegraph
 
Reported: 2011-10-14 20:17 UTC by Olli Pettay
Modified: 2011-10-24 23:37 UTC (History)
5 users (show)

See Also:


Attachments

Description Olli Pettay 2011-10-14 20:17:40 UTC
"An algorithm is allowed to show a pop-up if:
 - it is running in the context of an activation behavior or of the dispatching 
   of a click event, and
 - The click events that led to the triggering of the activation behaviors, if 
   any, and the click events of any event dispatching that indirectly led to the 
   algorithm being invoked, if any, are all trusted."

Testcase 
http://mozilla.pettay.fi/moztests/popup.html
All the browsers open a new tab

Since webkit doesn't support <a>.click() the test case is a bit hacky and
uses <input> element to dispatch click.
I could have of course just dispatched click using createEvent/initMouseEvent/dispatch
(I'm not quite happy with the test case, since it relies
on the implemented "activation behavior", not the totally different thing what 
the spec defines.)

But anyway, the point is that implementations usually allow popups *while* 
handling a trusted click event. Inside the event listener one can dispatch/handle
other events, but that doesn't affect to the popup blocking.
Manually dispatching and handling an event is effectively just a (synchronous) 
function call.
Comment 1 Ian 'Hixie' Hickson 2011-10-24 23:30:47 UTC
Makes sense.

I've changed the definition to just require one of the clicks to be trusted. Is that ok?

EDITOR'S RESPONSE: This is an Editor's Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document:
   http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: Accepted
Change Description: see diff given below
Rationale: Concurred with reporter's comments.
Comment 2 contributor 2011-10-24 23:37:49 UTC
Checked in as WHATWG revision r6739.
Check-in comment: Compatibility for pop-up blocking logic. (also wording change for bug 14472)
http://html5.org/tools/web-apps-tracker?from=6738&to=6739