I want to scroll an input field, code below just watches for scroll events and calls process event on the input field then generates a new keyboard event with the correct key… this correctly moves the caret inside the input field but does not scroll the input field like really pressing the up and down keys does, whats the difference?
#region IScrollHandler implementation
public void OnScroll (PointerEventData eventData)
{
if (eventData.IsScrolling())
{
if (eventData.scrollDelta.y < 0)
{
var ev = Event.KeyboardEvent("up");
inf.ProcessEvent(ev);
}
else{
var ev = Event.KeyboardEvent("down");
inf.ProcessEvent(ev);
}
}
}
#endregion