[Title] Unable to scroll m.facebook.com login page once start scrolling from edit field
[Issue#] WEB-3684
[Cause] The scroll events are consumed by text field when we try to scroll the page from it.
[Solution] As text field has single line of text, it should take only horizontal scroll events.
Avoiding vertical scroll handling on text fields.
[Developer] Divakar (diviakar.a@samsung.com)
Change-Id: I0eeb9d8c2d4af4e79be51c5380f5ef73a2a9a927
renderText->setScrollLeft(leftScrollOffset);
renderText->setScrollTop((int)trajectoryVector.y());
m_mousePressNode->document()->frame()->selection()->setCaretVisible(true);
- scrolled = true;
+ float deltaX = trajectoryVector.x();
+ float deltaY = trajectoryVector.y();
+ deltaX = (deltaX < 0) ? -deltaX : deltaX;
+ deltaY = (deltaY < 0) ? -deltaY : deltaY;
+ // Allow only horizontal scrolling on text field.
+ if (deltaX > deltaY)
+ scrolled = true;
}
}
#endif