Open Bug 241622 Opened 20 years ago Updated 2 years ago

crossing boundary between link's children makes click not follow link

Categories

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

defect

Tracking

()

People

(Reporter: jruderman, Unassigned)

References

()

Details

(Keywords: testcase)

Attachments

(1 file)

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a) Gecko/20040423
Firefox/0.8.0+

Steps to reproduce:
1. Go to http://www.google.com/search?q=qwt
2. Mouse down on a link just to the left of a bold area.
3. Move the cursor right 1-2 pixels.
4. Mouse up.

Expected: follow the link, since 1-2 pixels is below the drag threshold.

Result: nothing happens.
Attached file testcase
This testcase uses a background color to make the element boundary easier to
see.
The issue here is simple. The mousedown happens on one node, the mouseup on
another.  So there is no click event, since the two parts of the click happen on
different nodes.  This is generally desirable, in fact.
It's not what you want for link clicks, though...

Why doesn't a mouse down on one element and a mouse up on another cause an onclick event to fire targeted at the nearest common ancestor?
OS: Windows XP → All
Hardware: PC → All
Because generally you want to be able to cancel clicks by moving the mouse away before release... at least this is how most modern OSes behave.
My proposal would not cause "moving the mouse away before release" to send onclick events to links or buttons.

Similar problems occur in bug 324396, "Middle-click that crosses focus outline does not close tab".
Assignee: events → nobody
QA Contact: ian → events
I still see this bug on trunk.
Component: Event Handling → User events and focus handling
Severity: minor → S4
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: