Closed
Bug 156312
Opened 23 years ago
Closed 22 years ago
onscroll events fire when scroll doesn't happen
Categories
(Core :: DOM: Events, defect)
Core
DOM: Events
Tracking
()
VERIFIED
FIXED
mozilla1.2beta
People
(Reporter: dean_tessman, Assigned: radha)
References
()
Details
(Keywords: testcase)
Attachments
(1 file)
(deleted),
patch
|
saari
:
review+
jst
:
superreview+
|
Details | Diff | Splinter Review |
From bug 35011 comment 69:
Looking at
http://www.hixie.ch/tests/adhoc/dom/level0/001.html
We get onscroll events even when a scroll hasn't happened. For example, drag
the vertical scrollbar up beyond its bounds. The event counter keeps
incrementing. In IE6, the counter only increments if an actual scroll occurs.
Assignee | ||
Updated•23 years ago
|
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla1.2beta
Assignee | ||
Comment 1•22 years ago
|
||
The patch makes sure that there was indeed a change in the scrollbar
positionbefore firing the onScroll event. Because of this change onScroll event
will not fire if you resize the window and the resize lead to a change in the
size of the slider and/or the top position of the slider.
Comment 2•22 years ago
|
||
Comment on attachment 99899 [details] [diff] [review]
Initial patch
Nit of the day:
if (presShell && targetFrame && targetContent)
presShell->HandleEventWithTarget(&event, targetFrame, targetContent,
NS_EVENT_FLAG_INIT, &status);
- nsIScrollableView* s = GetScrollableView(mOuter->mPresContext);
+
s->RemoveScrollPositionListener(this);
ScrollbarChanged(mOuter->mPresContext, x*mOnePixel, y*mOnePixel);
s->AddScrollPositionListener(this);
How about removing the whole line where you're removing the code above, and
then also remove the empty line below it. No need to space things out this much
IMO.
Other than that, this looks great. sr=jst
Attachment #99899 -
Flags: superreview+
Comment 3•22 years ago
|
||
Comment on attachment 99899 [details] [diff] [review]
Initial patch
Looks good to me, r=saari
Attachment #99899 -
Flags: review+
Assignee | ||
Comment 4•22 years ago
|
||
Fix checked in.
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•