Bug 110284 - list-style-postion: outside returns wrong tag (UL instead of LI) in onclick event
Summary: list-style-postion: outside returns wrong tag (UL instead of LI) in onclick e...
Status: RESOLVED WORKSFORME
Alias: None
Product: konqueror
Classification: Applications
Component: khtml event (show other bugs)
Version: unspecified
Platform: Mandriva RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-06 13:23 UTC by Dick
Modified: 2008-04-20 07:21 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
testcase. (114 bytes, text/html)
2008-04-17 15:43 UTC, Christophe Marin
Details

Note You need to log in before you can comment on or make changes to this bug.
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.