Bug 34042 - visibility:hidden iframe captures contextual click.
Summary: visibility:hidden iframe captures contextual click.
Status: RESOLVED CONFIGURATION CHANGED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Frames (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac (Intel) OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2010-01-23 11:41 PST by Derk-Jan Hartman
Modified: 2023-06-02 00:17 PDT (History)
5 users (show)

See Also:


Attachments
HTML example of the problem. (1.13 KB, text/html)
2010-01-23 11:43 PST, Derk-Jan Hartman
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Derk-Jan Hartman 2010-01-23 11:41:28 PST
I'm attaching a html case with an iframe within an absolute positioned div. The div has visibility:hidden

Try to right click the link on the webpage. You will be presented with the contextual menu for the frame. The contextual menu options for the link are missing. This is annoying when trying to open a link in the new tab or new window, but even more annoying in that all elements behind this invisible iframe cannot be directly inspected with right-clik "Inspect Element". A mid mouse button click does force the opening of the link in a new tab. The problem can be worked around by using "display:none;" instead.

The bug is present in Safari 4 and the latest nightly (6531.21.10, r53765).
Comment 1 Derk-Jan Hartman 2010-01-23 11:43:16 PST
Created attachment 47274 [details]
HTML example of the problem.
Comment 2 Derk-Jan Hartman 2015-06-30 13:24:44 PDT
This problem still exists in Safari 9 seed 1
Comment 3 Alex Bussey 2019-02-06 08:42:30 PST
This is still present in the latest nightly build (r241015 - 2/6/19) and in production.

The use case we have is that we are a video player that sometimes plays ads in iFrames on top (in terms of z-index) the player. In between ad breaks, we put visibility: hidden on the iFrame. In all browsers, except Safari, right-clicking on the player will bring up the proper contextual menu from the player itself. However, in Safari, the event is still passed to the iFrame and the user sees the contextual menu from the iFrame.

We built a page, linked below, that plainly shows the behavior:

http://playertest.longtailvideo.com/jong/safari-hidden-iframe.html

In searching Bugzilla, it looks like similar issues were reported back to 2009 (#26649).
Comment 4 Radar WebKit Bug Importer 2019-05-03 19:36:36 PDT
<rdar://problem/50465354>
Comment 5 Derk-Jan Hartman 2020-10-29 06:10:29 PDT
Still exists in Safari 14
Comment 6 Mooho Kim 2022-10-21 01:34:42 PDT
Still exists in Safari 15.4
Comment 7 Rob Buis 2023-06-02 00:17:03 PDT
I can't repro on 16.4.