Bug 110284

Summary: list-style-postion: outside returns wrong tag (UL instead of LI) in onclick event
Product: [Applications] konqueror Reporter: Dick <kde>
Component: khtml eventAssignee: Konqueror Developers <konq-bugs>
Status: RESOLVED WORKSFORME    
Severity: normal CC: christophe, james
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Mandriva RPMs   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: testcase.

Description Dick 2005-08-06 13:23:02 UTC
Version:            (using KDE KDE 3.4.2)
Installed from:    Mandriva RPMs

This is the html page:

<html>
<body>
<ul onclick="alert(event.target.tagName);">
<li>test</li>
</ul>
</body>
</html>

Now click on the marker in front of the text "test" and the alert will display "UL" . Both MSIE and mozilla/firefox will display "LI".

It only happens with list-style-position: outside (the default) 
With list-style-postion: inside , LI is returned (like I expected)

It makes no difference, whether you are using a list-style-type or a list-style-image.

I wanted to use this to build a "tree" and expand a subtree when you click on either the marker or the text. The problem is that with konqueror you do not know which LI element was clicked.
Comment 1 Allan Sandfeld 2006-05-19 21:05:50 UTC
Confirmed. I suspect that the event-handler never realize you have clicked the marker, since markers are kinda virtual positioned, and just returns UL because you hit the inside of the UL.
Comment 2 Christophe Marin 2008-04-17 15:43:41 UTC
Created attachment 24373 [details]
testcase.

The issue can't be reproduced in SVN (rev. 798035)

Clicking on "test" will return "LI".
Comment 3 James Spahlinger 2008-04-20 07:21:44 UTC
Provided test case works for konq 3.5.9. as well as 4.0.3. Closing this bug as both 3.5.x and 4.x work.

Using Gentoo Linux ~x86 (testing in gentoo lingo). KDE 3.5.9/4.0.3 and the majority of packages compiled using gcc 4.3.0.