RESOLVED CONFIGURATION CHANGED 34042
visibility:hidden iframe captures contextual click.
https://bugs.webkit.org/show_bug.cgi?id=34042
Summary visibility:hidden iframe captures contextual click.
Derk-Jan Hartman
Reported 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).
Attachments
HTML example of the problem. (1.13 KB, text/html)
2010-01-23 11:43 PST, Derk-Jan Hartman
no flags
Derk-Jan Hartman
Comment 1 2010-01-23 11:43:16 PST
Created attachment 47274 [details] HTML example of the problem.
Derk-Jan Hartman
Comment 2 2015-06-30 13:24:44 PDT
This problem still exists in Safari 9 seed 1
Alex Bussey
Comment 3 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).
Radar WebKit Bug Importer
Comment 4 2019-05-03 19:36:36 PDT
Derk-Jan Hartman
Comment 5 2020-10-29 06:10:29 PDT
Still exists in Safari 14
Mooho Kim
Comment 6 2022-10-21 01:34:42 PDT
Still exists in Safari 15.4
Rob Buis
Comment 7 2023-06-02 00:17:03 PDT
I can't repro on 16.4.
Note You need to log in before you can comment on or make changes to this bug.