Open Bug 473103 Opened 16 years ago Updated 2 years ago

Can't drag <scale> thumb when |max| and |increment| are set to large values

Categories

(Toolkit :: UI Widgets, defect)

x86
macOS
defect

Tracking

()

People

(Reporter: Dolske, Unassigned)

Details

When using a <scale> with large values set for |max| and |increment|, you can't drag the thumb with the mouse. EG: <xul:scale increment="10000" max="30000"/> The culprit is nsSliderFrame::SetCurrentThumbPosition()... 723 if (aMaySnap && mContent->AttrValueIs(...) { 725 // If snap="true", then the slider may only be set to min + (increment * x). 726 // Otherwise, the slider may be set to any positive integer. 727 PRInt32 increment = GetIncrement(aScrollbar); 728 realpos = NSToCoordRound(realpos / float(increment)) * increment; 729 } "realpos" here seems to be a pixel count. The end result is that it's diving $smallnum by $largenum, and realpos ends up being 0. Looks like there needs to be some additional logic here. Say, converting realpos into a percentage, computing which slot that is (incorporating min, max, and increment), and then snapping to that slot. Found this while working on the videocontrols, but it's not blocking. I thought the |increment| only affected what the arrow keys did (as |pageIncrement| does for pgup/pgdn). I don't want the snapping when dragging, so leaving the attribute at its default value avoids both problems.
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.