DIV OnClick not working over all DOM elements

RESOLVED DUPLICATE of bug 102695

Status

()

Core
DOM: Events
RESOLVED DUPLICATE of bug 102695
14 years ago
4 years ago

People

(Reporter: John Rutherford, Unassigned)

Tracking

({qawanted})

Trunk
x86
Windows XP
qawanted
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Reporter)

Description

14 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040803 Firefox/0.9.3
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040803 Firefox/0.9.3

I have page with absolutely positioned embedded iframes. The top 85 or so pixles
are clear of the iframes. I have an oncontext function to create my own context
menus. These menues are supplied via hidden divs. The base page displays these
context menus over everything including the iframes. There are inline events
attached to the master div containing the context div elements. onmouse.. events
work fine over the scope of the entire window. However the onclick event does
not work when the postion of the context menu is positioned over the iframes. If
you change the onclick to an onmousedown it works as expected.

Reproducible: Always
Steps to Reproduce:
The attached test case sets up the eact environment.
1.Open the test case. 
2.OOB it fails as the context menu div id="cMenu" onmousedown="jumpto(event)" is
active in the file frames.htm.   
3.The context menu will work fully in the red, orange and yellow areas of the
base page. The onclick of the context menu will NOT in the white areas which are
iframes. 
4. The context menu is absolutly positioned at all times with a z-index that
places it over everything at all times.

Actual Results:  
The DIV onclick event does not work when the div is over an iframe.

Expected Results:  
Context menu should work fully anywhere within the viewport are of the browser
(Reporter)

Comment 1

14 years ago
Created attachment 158493 [details]
DIV over Iframe onclick event failure test
(Reporter)

Comment 2

14 years ago
Sorry step 2 should say:
2.OOB it fails as the context menu div id="cMenu" onclick="jumpto(event)" is
active in the file frames.htm. 
Minimal testcase needed.... Chances are, this is a duplicate.
Keywords: qawanted
Whiteboard: DUPEME

Comment 4

14 years ago
Here a test-case which shows this bug in latest nightly firefox:

Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.3) Gecko/20041009
Firefox/0.10 en-us,en;q=0.5

<HTML>
<BODY>
<DIV STYLE="position:absolute;top:0;left:0;width:400px;height:200px;"></DIV>
<FORM><INPUT TYPE=BUTTON VALUE="Can't click this" onClick="alert('bug
fixed!')"></FORM>
</BODY>
</HTML>

Comment 5

14 years ago
FYI: Interesting enough this bug/behaviour is same in Opera 7.54.3865 and (well,
of course) in Netscape 7.2 while the click-event gets through to the button in
IE6 latest all patched on Win2k.

Comment 6

14 years ago
Created attachment 166877 [details]
Testcase mentioned in comment #4

Text selection is not possible either when text is under an empty and abs. pos.
div.

Comment 7

13 years ago
The bug is still present in

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b2) Gecko/20050331
Firefox/1.0+
Status: UNCONFIRMED → NEW
Ever confirmed: true

*** This bug has been marked as a duplicate of 102695 ***
Status: NEW → RESOLVED
Last Resolved: 13 years ago
Resolution: --- → DUPLICATE

Updated

4 years ago
Whiteboard: DUPEME
You need to log in before you can comment on or make changes to this bug.