google-code-export / rocket-gwt

Automatically exported from code.google.com/p/rocket-gwt
1 stars 1 forks source link

Slider thumb dragging is broken when browser client area has been scrolled #6

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Run Slider test
2. Resize browser window so its small.
3. Scroll client area.
4. Attempt to drag either Horizontal/VerticalSlider thumb.

What is the expected output? What do you see instead?
The mouse should be next to the thumb and not separated.

Thanks to Ash for spotting this.

Original issue reported on code.google.com by miroslav...@gmail.com on 3 Oct 2006 at 10:37

GoogleCodeExporter commented 9 years ago
Problem has been fixed. Fix will be included in next release.

Scan HorizontalSlider & VerticalSlider  where XXX is "X" (HorizontalSlider) or
"Y"(VerticalSlider).

The mistake was due to forgetting to add the scroll offset to the mouse 
coordinate.
/// BEGIN ///
final int mouseXXX = DOM.eventGetClientXXX( event );
/// END ///
replace with 
/// BEGIN ///
final int mouseXXX = DOM.eventGetClientY( event ) + 
BrowserHelper.getScrollXXX();
/// END

Original comment by miroslav...@gmail.com on 3 Oct 2006 at 11:21