Bug 3662 - onClick event for TD element doesn't fire unless its contents are clicked
Summary: onClick event for TD element doesn't fire unless its contents are clicked
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tables (show other bugs)
Version: 412
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Dave Hyatt
: 4339 (view as bug list)
Depends on:
Reported: 2005-06-22 20:09 PDT by Sebastien Boisvert
Modified: 2005-08-19 16:37 PDT (History)
3 users (show)

See Also:

testcase (300 bytes, text/html)
2005-06-22 20:09 PDT, Sebastien Boisvert
no flags Details
patch to fix this (1.85 KB, patch)
2005-08-14 23:55 PDT, Darin Adler
mjs: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sebastien Boisvert 2005-06-22 20:09:20 PDT
An onClick event specified for a TD element will not fire unless its contents are clicked, instead of 
simply clicking anywhere within the cell.

Steps to reproduce:
1- load attached testcase in browser
2- click anywhere in table cell, except on text
3- click text in table cell

Actual result:
 alert triggered by onclick event only pops up when the cell's contents are clicked

Expected result:
 alert should popup regardless of where within the cell the mouse click occurs

Additional Information:
 Works as expected in Firefox, Camino, IE/Win, IE/Mac
Comment 1 Sebastien Boisvert 2005-06-22 20:09:54 PDT
Created attachment 2562 [details]
Comment 2 Chris Petersen 2005-06-22 22:10:51 PDT
Confirming with TOT Webkit and Safari 2.0 (v412).
Comment 3 Frido Ferdinand 2005-08-09 06:02:26 PDT
Also occurs with the mouseover event
Comment 4 Dave Hyatt 2005-08-09 12:11:18 PDT
*** Bug 4339 has been marked as a duplicate of this bug. ***
Comment 5 Darin Adler 2005-08-14 19:44:13 PDT
The behavior of this is not entirely consistent. I can construct test cases where the onclick event 
sometimes fires and sometimes does not fire. I'll attach one soon.
Comment 6 Darin Adler 2005-08-14 23:55:53 PDT
Created attachment 3395 [details]
patch to fix this
Comment 7 Maciej Stachowiak 2005-08-17 23:02:07 PDT
Comment on attachment 3395 [details]
patch to fix this


can this be tested in an automated way?
Comment 8 Darin Adler 2005-08-19 09:43:45 PDT
I don't see a way to exercise the hit testing code from JavaScript.
Comment 9 David Harrison 2005-08-19 16:37:28 PDT
Added originally attached test case to manual_tests.