Closed Bug 438241 Opened 16 years ago Closed 16 years ago

Mousover and mouseout don't behave with nested elements.

Categories

(Core :: DOM: Events, defect, P1)

defect

Tracking

()

VERIFIED FIXED

People

(Reporter: ryanmcgeary, Assigned: smaug)

References

()

Details

(Keywords: regression, testcase, verified1.9.1)

Attachments

(2 files, 1 obsolete file)

User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9) Gecko/2008053008 Firefox/3.0
Build Identifier: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9) Gecko/2008053008 Firefox/3.0

Try this example that demonstrates the problem:
http://eyestreet.com/~rmcgeary/test-hover-ff3.html


Reproducible: Always

Steps to Reproduce:
1. Try hovering over the input elements in the example.
2. Continue to move the mouse over the input elements until more than one element is left red.
Actual Results:  
In Firefox 3 RC2, some elements are left red even though the mouse has left those elements.

Expected Results:  
Upon hover (mouseover) of any element, the background color should be made red. Mouseout should return the background color to white.
Assignee: general → nobody
Component: JavaScript Engine → DOM: Events
QA Contact: general → events
Attached file Reporters testcase
Keywords: testcase
OS: Mac OS X → All
Hardware: Macintosh → All
Confirming on Windows 2000.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: regression
Just like bug 436930, coincidentally filed a few days ago, this is a regression from bug 369644.
Blocks: 369644
Version: unspecified → Trunk
Looks like a regression between 2007-05-13-01 and 2007-05-14-01.

Bonsai log:  http://bonsai.mozilla.org/cvsquery.cgi?treeid=default&module=MozillaTinderboxAll&branch=HEAD&branchtype=match&dir=&file=&filetype=match&who=&whotype=match&sortby=Date&hours=2&date=explicit&mindate=2007-05-13+01&maxdate=2007-05-14+01&cvsroot=%2Fcvsroot

Looks like a regression from bug 369644.  This is pretty nasty....
Flags: wanted1.9.0.x?
Flags: blocking1.9.1?
Version: Trunk → unspecified
Version: unspecified → Trunk
Attached patch proposed patch. (obsolete) — Splinter Review
The real change here is adding an extra IsInNativeAnonymousSubtree().
That way scrollbar handling on bug 369644 doesn't regress and I can't see
this bug anymore. Changed some naming too.

-            if (nonAnon == nonAnonRelated ||
-                nsContentUtils::ContentIsDescendantOf(nonAnonRelated, nonAnon)) {
+            if (anonOwner == anonOwnerRelated ||
+                (anonOwnerRelated->IsInNativeAnonymousSubtree() &&
+                 nsContentUtils::ContentIsDescendantOf(anonOwnerRelated,
+                                                       anonOwner))) {

The patch should be very safe - at least it shouldn't break anything more
than what is now since it is limiting the cases when
we stop event propagation.
Assignee: nobody → Olli.Pettay
Status: NEW → ASSIGNED
Attachment #324499 - Flags: review?(jst)
Attached patch v2Splinter Review
Tricky to handle all the cases, so I eventually had to add
that
relatedTarget->FindFirstNonNativeAnonymous() == originaltarget->FindFirstNonNativeAnonymous()
That makes sure we never stop propagation when we shouldn't.
Attachment #324499 - Attachment is obsolete: true
Attachment #324599 - Flags: review?(jst)
Attachment #324499 - Flags: review?(jst)
Could this be the same as bug 436930? We've got a good testcase here so marking blocking.
Flags: wanted1.9.0.x?
Flags: wanted1.9.0.x+
Flags: blocking1.9.1?
Flags: blocking1.9.1+
Priority: -- → P1
Attachment #324599 - Flags: review?(jst) → review+
Comment on attachment 324599 [details] [diff] [review]
v2

Jonas, could you sr?
Attachment #324599 - Flags: superreview?(jonas)
This regression seems like a big deal and drastically affects my own web development.  I'm extremely disappointed this didn't block the release of Firefox 3.  The avoidance of basic event handling gives a bad name to such a great project.  This seriously taints an otherwise great release.

What can I do to help move this fix forward?
Comment on attachment 324599 [details] [diff] [review]
v2

Is FindNativeAnonymousSubtreeOwner something we want to expose on nsIContent?

sr=me either way.
Attachment #324599 - Flags: superreview?(jonas) → superreview+
Flags: blocking1.9.0.1?
Is this ready to get nominated for approval1.9.0.1?
Flags: blocking1.9.0.1? → blocking1.9.0.1-
Attachment #324599 - Flags: approval1.9.0.1?
I commited this to trunk already June 23.
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Attachment #324599 - Flags: approval1.9.0.1? → approval1.9.0.2?
Attachment #324599 - Flags: approval1.9.0.2?
Depends on: 445416
Comment on attachment 324599 [details] [diff] [review]
v2

If this gets to 1.9.0.x, so should Bug 445416. Both have had some baking time.
Attachment #324599 - Flags: approval1.9.0.4?
QA: If/when this gets fixed in 1.9.0.x, please verify bug 436930 as well.
Attachment #324599 - Flags: approval1.9.0.4? → approval1.9.0.4-
Comment on attachment 324599 [details] [diff] [review]
v2

not approved for 1.9.0.4, doesn't meet the new stricter criteria. Users will get this in 3.1
Flags: wanted1.9.0.x+
verified FIXED after about 20 hover-streaks over the set of textfields...on builds:

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2a1pre) Gecko/20090406 Minefield/3.6a1pre (.NET CLR 3.5.30729) ID:20090406045355

and

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b4pre) Gecko/20090331 Shiretoko/3.5b4pre (.NET CLR 3.5.30729) ID:20090331041754
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: