Closed
Bug 359393
Opened 18 years ago
Closed 18 years ago
Wrong target reported for the scroll event
Categories
(Core :: DOM: UI Events & Focus Handling, defect)
Tracking
()
VERIFIED
FIXED
People
(Reporter: Max.Starets, Assigned: roc)
References
Details
(Keywords: regression, testcase, verified1.8.1.2)
Attachments
(2 files)
463 bytes,
text/html
|
Details | |
1.57 KB,
patch
|
smaug
:
review+
MatsPalmgren_bugz
:
superreview+
jay
:
approval1.8.1.2+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1) Gecko/20061010 Firefox/2.0 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1) Gecko/20061010 Firefox/2.0 The document object is reported as the event.target for the scroll event instead of the DIV that fired the event. This is a regression in the Gecko/20061010 Firefox/2.0 build. Previous 1.8-based builds reported DIV as the target Reproducible: Always Steps to Reproduce: Code to reproduce (scroll to see the alert popup): <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <body> <div id="parentDIV" style="position:relative;width:300px;height:300px;overflow:auto"> <div style="position:relative;width:600px;height:600px"> </div> </div> </body> <script> function handleScroll(evt) { alert(evt.target); } var div = document.getElementById("parentDIV"); div.addEventListener("scroll", handleScroll, false); </script> </html> Actual Results: Alert displays "Object HTMLDocument" Expected Results: Alert should display "Object HTMLDivElement"
Updated•18 years ago
|
Keywords: regression
Version: Trunk → 1.8 Branch
Comment 1•18 years ago
|
||
Comment 2•18 years ago
|
||
This regressed on the 1.8 branch between 2006-03-26 and 2006-03-28: http://bonsai.mozilla.org/cvsquery.cgi?treeid=default&module=all&branch=MOZILLA_1_8_BRANCH&branchtype=match&dir=&file=&filetype=match&who=&whotype=match&sortby=Date&hours=2&date=explicit&mindate=2006-03-26+05&maxdate=2006-03-28+06&cvsroot=%2Fcvsroot I think a regression from bug 305160, somehow. No idea why that patch would not regress on trunk, but does regress on branch.
Updated•18 years ago
|
Flags: in-testsuite?
Comment 3•18 years ago
|
||
(In reply to comment #2) > No idea why that patch would not regress on trunk, but does regress on branch. > Because of bug 234455 ;)
Assignee | ||
Comment 4•18 years ago
|
||
Should we fix this on the 1.8.1 branch?
Comment 5•18 years ago
|
||
I don't know, I just nominated it because it's a regression from the 1.8.0.x branch.
Assignee | ||
Comment 6•18 years ago
|
||
OK, so I wonder whether we should fix it.
Comment 7•18 years ago
|
||
(In reply to comment #6) > OK, so I wonder whether we should fix it. > I've just found this error in my application. I think you should fix it ;). Wes Gamble
Comment 8•18 years ago
|
||
Not blocking a specific branch release, but we definitely want to fix it on the branch, so moving flag to "wanted", and would be happy to see a reviewed, safe, patch!
Flags: wanted1.8.1.x+
Flags: blocking1.8.1.1?
Flags: blocking1.8.1.1-
Comment 9•18 years ago
|
||
*** Bug 362818 has been marked as a duplicate of this bug. ***
Assignee | ||
Comment 10•18 years ago
|
||
For the case where we're dispatching to content, it's OK to use nsIPresShell::HandleEventWithTarget like we did before. And in fact we need to, otherwise no particular target it set and it falls back to the document.
Assignee: events → roc
Status: NEW → ASSIGNED
Attachment #247765 -
Flags: superreview?(mats.palmgren)
Attachment #247765 -
Flags: review?
Assignee | ||
Updated•18 years ago
|
Attachment #247765 -
Flags: review? → review?(Olli.Pettay)
Comment 11•18 years ago
|
||
Comment on attachment 247765 [details] [diff] [review] fix Looks good to me. sr=mats
Attachment #247765 -
Flags: superreview?(mats.palmgren) → superreview+
Updated•18 years ago
|
Attachment #247765 -
Flags: review?(Olli.Pettay) → review+
Assignee | ||
Comment 12•18 years ago
|
||
Comment on attachment 247765 [details] [diff] [review] fix Need branch approval. This can't bake on trunk because it's a branch-only patch.
Attachment #247765 -
Flags: approval1.8.1.2?
Attachment #247765 -
Flags: approval1.8.0.10?
Comment 13•18 years ago
|
||
If this is a regression on the 1.8 branch (possibly from bug 305160) then why is there a 1.8.0 approval request also? Is that a mistake, or is this not a regression?
Blocks: 305160
Assignee | ||
Comment 14•18 years ago
|
||
Comment on attachment 247765 [details] [diff] [review] fix That was an error, sorry
Attachment #247765 -
Flags: approval1.8.0.10?
Comment 15•18 years ago
|
||
Comment on attachment 247765 [details] [diff] [review] fix Approved for 1.8 branch, a=jay for drivers.
Attachment #247765 -
Flags: approval1.8.1.2? → approval1.8.1.2+
Assignee | ||
Comment 16•18 years ago
|
||
Fixed in 1.8.1.2
Comment 17•18 years ago
|
||
Verified using testcase in comment #1: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.2pre) Gecko/20070116 BonEcho/2.0.0.2pre
Status: RESOLVED → VERIFIED
Keywords: fixed1.8.1.2 → verified1.8.1.2
Updated•5 years ago
|
Component: Event Handling → User events and focus handling
You need to log in
before you can comment on or make changes to this bug.
Description
•