If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

mozilla doesn't return onclick events when clicking on an IFRAME

NEW
Unassigned

Status

()

Core
DOM: Events
14 years ago
8 years ago

People

(Reporter: Miguel, Unassigned)

Tracking

Trunk
x86
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

14 years ago
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031209 Firebird/0.7
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031209 Firebird/0.7

The only events that now mozilla is returning on IFRAMEs are onmouseover,
onmouseout.... movement events, no keypress or mouse click.

Reproducible: Always

Steps to Reproduce:
1.Create a IFRAME with an onclick javascript function 
2.click on the blank iframe  and nothing happens
3.
Assignee: general → events
Component: JavaScript Engine → DOM: Events
QA Contact: PhilSchwartau → ian
That's because the click is going to the document inside the frame (and events
don't bubble across document boundaries).

This _may_ get changed if we get rid of that document, but I'm not sure that
would be correct.

Comment 2

14 years ago
You know IE 6 behaves the same. I don't know whether we're correct, but we're
compatible. Oddly, I couldn't find a duplicate bug, closed or open. Hixie?
Status: UNCONFIRMED → NEW
Ever confirmed: true
I don't know.

Comment 4

13 years ago
I just upgraded to Mozilla 1.7.1 from 1.6 and now this bug is giving me problems.

I have an xul file with an iframe that contains a html doc (basically a
browser).  The onclick event still bubbles up when the iframe is in an xul
window loaded from a chrome:// uri but now it doesn't work when the xul file is
loaded from an http:// uri; it used to work.  I need to run javascript functions
that reside in the xul window (but ouside the iframe) whenever a user clicks on
the html doc in the iframe.  Any ideas on a workaround to get this functionality
in an xul window loaded from an http:// uri?

Comment 5

13 years ago
I'm not a pro bug reporter, but my guess is that this bug is the same that
doesn't handle onclick events on my page: http://weblog.iequ.nl

When you click the little plus button (action expand), some text should be
displayed. But the js-console is says that the element is not defined, but it is.

-- After reloading only the frame, everything works. -- 

Tested with Mozilla Firefox 1.0.1 / WinXP
Assignee: events → nobody
QA Contact: ian → events
You need to log in before you can comment on or make changes to this bug.