gui.SetTextInputFocus was setting gui.mouseDownRect, which is heavily used by scrollbars to detect is the mouse is still inside the scrollbar rect when dragging.
Since the PageSearch focus gets updated every (build) event, the mouseDownRect was effectively always set to the search input, and the scrollbar could not be dragged as it detected that the mouse was not in the correct Rect anymore.
I fixes the issue by introducing a gui.focusRect, so these Rects are tracked independently. Both typing text, as well as dragging the PageSearch scrollbar seem to be working now.
I (quickly) checked some other input fields, but did not see any regressions.
(The other commit is a small cleanup that I encountered while debugging this issue)
gui.SetTextInputFocus
was settinggui.mouseDownRect
, which is heavily used by scrollbars to detect is the mouse is still inside the scrollbar rect when dragging.Since the
PageSearch
focus gets updated every (build) event, themouseDownRect
was effectively always set to the search input, and the scrollbar could not be dragged as it detected that the mouse was not in the correctRect
anymore.I fixes the issue by introducing a
gui.focusRect
, so theseRect
s are tracked independently. Both typing text, as well as dragging thePageSearch
scrollbar seem to be working now.I (quickly) checked some other input fields, but did not see any regressions.
(The other commit is a small cleanup that I encountered while debugging this issue)
Fixes #168