Bug 26649 - <div> has higher z-index than <iframe> but context menu etc. is for <iframe>
Summary: <div> has higher z-index than <iframe> but context menu etc. is for <iframe>
Status: RESOLVED CONFIGURATION CHANGED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Frames (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2009-06-23 07:15 PDT by Bill Keese
Modified: 2022-06-19 16:36 PDT (History)
8 users (show)

See Also:


Attachments
test case showing how iframe gets events even though it's hidden behind a div (956 bytes, text/html)
2009-06-23 07:17 PDT, Bill Keese
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bill Keese 2009-06-23 07:15:46 PDT
I'll attach a test case shortly.   Basically, there's an <iframe> at z-index: 0, and then a <div> at z-index: 999, but when you right-click over the <div> you get the menu for the <iframe> (with choices like "open in new window")

Not shown in the test case, but probably related, is a bug where you can paste into the underlying <iframe> (by using the paste option from the context-menu) even though the iframe is theoretically hidden by the div.

See also:

  - http://www.codingforums.com/archive/index.php/t-55100.html

  - http://stackoverflow.com/questions/850484/workaround-for-drawing-bug-when-overlaying-a-div-over-an-iframe-in-safari
Comment 1 Bill Keese 2009-06-23 07:17:01 PDT
Created attachment 31719 [details]
test case showing how iframe gets events even though it's hidden behind a div
Comment 2 martin.pucala 2009-08-25 02:03:31 PDT
It looks like iframes have somehow priority among contextmenu event listeners - even if the iframe is hidden, page's main contextmenu handler is overriden. In the show case attached below there is contextmenu event handler on main document element that displays alert and suppresses default browser menu display by returning false. However, in the area where _hidden_ iframe resides, main page's handler is ignored.
Comment 3 Ahmad Saleem 2022-06-19 15:28:04 PDT
I am not able to reproduce this in Safari 15.5 on macOS 12.4 based on attached test case.

When clicking on "Grey" area, it does not show me any "frame" specific context menu, which might have been the case in the past.

Can we mark it as "RESOLVED CONFIGURATION CHANGED", if it was fixed along the ways? Thanks!
Comment 4 Radar WebKit Bug Importer 2022-06-19 15:28:29 PDT
<rdar://problem/95500633>
Comment 5 Ryosuke Niwa 2022-06-19 16:36:34 PDT
Yeah, not reproducing now.