Closed Bug 429020 Opened 17 years ago Closed 17 years ago

Scrollbars jump when being clicked and held to scroll down page.

Categories

(Core :: XUL, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9

People

(Reporter: hyperpal, Assigned: mstange)

References

Details

(Keywords: regression)

Attachments

(2 files, 2 obsolete files)

User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; en-US; rv:1.9b5) Gecko/2008032619 Firefox/3.0b5 Build Identifier: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; en-US; rv:1.9b5) Gecko/2008032619 Firefox/3.0b5 If you scroll to a middle of the page (so the scroll bar is half way down) and click and hold the scroll bar, the page will immediately jump up. When you pull the scroll bar down (still holding the mouse) it will jump back to where it was originally and start scrolling smoothly. Reproducible: Always Steps to Reproduce: 1. 2. 3.
Confirming. In order to be able to see the bug, you have to choose "Click in the scrollbar to: Scroll to here" in the OS X appearance prefs panel. Firefox 2 doesn't have this bug => regression.
Status: UNCONFIRMED → NEW
Component: General → XP Toolkit/Widgets
Ever confirmed: true
Keywords: regression
OS: Mac OS X → All
Product: Firefox → Core
Hardware: Macintosh → All
Version: unspecified → Trunk
Assignee: nobody → jag
QA Contact: general → xptoolkit.widgets
Assignee: jag → mstange
Status: NEW → ASSIGNED
Attachment #316626 - Flags: review?(roc)
- // On Mac the option key inverts the scroll-to-here preference. - PRBool invertScrollToClick = PR_FALSE; - mouseEvent->GetAltKey(&invertScrollToClick); Why are we getting rid of this?
Because that's only true when the mouse is over the scrollbar track. When clicking the thumb, on Mac OS X the scrollbar shouldn't scroll to click, regardless of preference and pressed keys. nsSliderFrame::MouseDown only handles clicks on the thumb. Clicks in the scrollbar track area are handled by nsSliderFrame::HandleEvent.
Comment on attachment 316626 [details] [diff] [review] Fix v1.0: fix jumping bug, disable scroll-to-click on the thumb on Mac OS X, fix mouse button handling, add scrollbar tests Requesting approval1.9: Simple fix for an annoying glitch, very low risk, tests included.
Attachment #316626 - Flags: approval1.9?
Comment on attachment 316626 [details] [diff] [review] Fix v1.0: fix jumping bug, disable scroll-to-click on the thumb on Mac OS X, fix mouse button handling, add scrollbar tests a1.9=beltzner
Attachment #316626 - Flags: approval1.9? → approval1.9+
Markus, you don't have CVS access, right? (Do you want it?)
Keywords: checkin-needed
Wow. That would be cool.
I didn't check this in because the test added by this patch fails for me, on Mac, when run in the iframe from the main test runner (e.g. runtests.py --test-path=toolkit/content/ --autorun). Running it directly passes.
Keywords: checkin-needed
Huh. Thanks for checking, I'll see what I can do.
Attached patch Fix v1.1: fixed test, ready for checkin (obsolete) (deleted) — Splinter Review
In the iframe the scrollbar had a different size, so the scrollbar thumb was smaller and the synthesized click didn't hit it. Now the scrollbar is always 500px wide.
Attachment #316626 - Attachment is obsolete: true
Keywords: checkin-needed
OK... my patch breaks the test for the scale control. I'll have a look at that tomorrow.
Keywords: checkin-needed
Attachment #317098 - Attachment is obsolete: true
Never mind. The scale test fails for me without the patch, too.
Keywords: checkin-needed
Attachment #317098 - Attachment is obsolete: false
With the latest patch, 4 "On platforms other than Mac OS X, holding shift should enable scroll-to-click on the scrollbar thumb." tests are failing for me, on Windows.
Keywords: checkin-needed
Attached patch Fix v1.2: fixed test, take 2 (deleted) — Splinter Review
Thank you, Gavin. I think I've found the bug in the test (the mouse button wasn't checked), could you test again?
Attachment #317098 - Attachment is obsolete: true
Thanks Markus, the test now passes on Windows and Mac for me. I'll check this in later today.
Keywords: checkin-needed
mozilla/layout/xul/base/src/nsSliderFrame.cpp 1.181 mozilla/toolkit/content/tests/widgets/Makefile.in 1.57 mozilla/toolkit/content/tests/widgets/test_scrollbar.xul 1.1
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9
Could this have caused bug 430723?
Depends on: 430723
No longer depends on: 430723
Attached file altered test (deleted) —
2 of the tests are failing here, because I use 'fat' scrollbars (10px wider than normal). This patch fixes the failures for me, it's a bit of a kludge, because I don't really understand how the test works. I wonder where the value of 160 for x is coming from.
(In reply to comment #21) > I wonder where the value of 160 for x is coming from. Pretty much guesswork; I needed a point that was between the center and the right edge of the scrollbar thumb and 160 did the job. - Not good enough, as it turns out. I'm fine with your patch; using the scrollbar height as a hint for the variation of the thumb size sounds like a good idea.
Attachment #321050 - Attachment mime type: application/octet-stream → text/html
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: