Bug 860701 - Check for error in nsRangeFrame::GetValueAtEventPoint so that we don't change the value of <input type=range> when we can't convert an event to a valid point. r=me

This commit is contained in:
Jonathan Watt 2013-04-15 06:01:38 +01:00
parent 1384dc65ae
commit c402225cbc

View File

@ -409,6 +409,11 @@ nsRangeFrame::GetValueAtEventPoint(nsGUIEvent* aEvent)
nsPoint point =
nsLayoutUtils::GetEventCoordinatesRelativeTo(aEvent, absPoint, this);
if (point == nsPoint(NS_UNCONSTRAINEDSIZE, NS_UNCONSTRAINEDSIZE)) {
// We don't want to change the current value for this error state.
return GetValue();
}
nsRect rangeContentRect = GetContentRectRelativeToSelf();
nsSize thumbSize;