Bug 3662

Summary: onClick event for TD element doesn't fire unless its contents are clicked
Product: WebKit Reporter: Sebastien Boisvert <sebastienboisvert>
Component: TablesAssignee: Dave Hyatt <hyatt>
Status: RESOLVED FIXED    
Severity: Normal CC: frido.ferdinand, maksim, will.mccullough
Priority: P2    
Version: 412   
Hardware: Mac   
OS: OS X 10.4   
Attachments:
Description Flags
testcase
none
patch to fix this mjs: review+

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]
testcase
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

r=me

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.