Open Bug 452598 Opened 16 years ago Updated 2 years ago

'onclick' property on tag inside <button> doesn't work in Fx 3

Categories

(Core :: DOM: UI Events & Focus Handling, defect)

x86
Windows XP
defect

Tracking

()

People

(Reporter: igor.rzegocki, Unassigned)

References

()

Details

(Keywords: testcase)

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.1) Gecko/2008070208 Firefox/3.0.1
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.1) Gecko/2008070208 Firefox/3.0.1

As shown on example in url ( http://junk.rzegocki.pl/button-glitch.html ), when you click on the <var> tag, onclick doesn't catch (you don't see alert();). This issue doesn't occur in 2.x version. Is this is expected behavior? Is there any workaround for this ?

Reproducible: Always

Steps to Reproduce:
1.Click on the yellow field (<var> tag)
2.
3.
Actual Results:  
alert() is not launched in firefox 3.x, but it works in firefox 2.x

Expected Results:  
alert() should be launched in firefox 3
Version: unspecified → 3.0 Branch
It is a rather recent change.
(In reply to comment #1)
> It is a rather recent change.

Sorry, wrong info, although it is a regression from Firefox 2. 

Works: 2006021905
Fails: 2006021913

Regression range: 

http://bonsai.mozilla.org/cvsquery.cgi?module=PhoenixTinderbox&date=explicit&mindate=2006-02-19+04%3A00&maxdate=2006-02-19+14%3A00
Bug 326827 is he most likely culprit I think.
Blocks: 326827
Component: General → Event Handling
Product: Firefox → Core
QA Contact: general → events
Version: 3.0 Branch → Trunk
Flags: blocking1.9.1?
(In reply to comment #3)
> I thought this never used to work because of this:
> http://mxr.mozilla.org/mozilla-central/source/content/html/content/src/nsHTMLButtonElement.cpp#423
That happens during PostHandle, so after normal dom event dispatch
(and it is still unclear why that code was added there).

I wonder what is the expected behavior here. I think I prefer the current behavior and it seems that it is closer to what HTML4 specifies
"Buttons created with the BUTTON element function just like buttons created with the INPUT element, but they offer richer rendering possibilities".

What do the other browsers do?
Attached file testcase
IE8 shows the mouseover, mousemove and mouseout events, but not the mousedown, click and mouseup events in this case.
Opera 9.50 shows all of them, as does Safari.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: testcase
Not a blocker.
Flags: blocking1.9.1? → blocking1.9.1-
If you're looking for upvar2, see bug 452498.
Depends on: 493466
No longer depends on: 493466
Depends on: 494186
No longer depends on: 494186
Depends on: 502630
No longer depends on: 502630
Depends on: 505220
No longer depends on: 505220
cvsroot/mozilla/js/tests/js1_8_1/trace/trace-test.js,v  <--  trace-test.js
new revision: 1.14; previous revision: 1.13

/cvsroot/mozilla/js/tests/shell.js,v  <--  shell.js
(In reply to comment #8)

sorry. wrong bug.
Depends on: 527032
No longer depends on: 527032
Depends on: 527032
No longer depends on: 527032
Depends on: 598232
Component: Event Handling → User events and focus handling
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: