Bug 26649

Summary: <div> has higher z-index than <iframe> but context menu etc. is for <iframe>
Product: WebKit Reporter: Bill Keese <bill>
Component: FramesAssignee: Nobody <webkit-unassigned>
Status: RESOLVED CONFIGURATION CHANGED    
Severity: Normal CC: ahmad.saleem792, ap, koivisto, martin.pucala, rniwa, simon.fraser, webkit-bug-importer, zalan
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: OS X 10.5   
Attachments:
Description Flags
test case showing how iframe gets events even though it's hidden behind a div none

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.