TextInput no longer captures scroll with a zero X

This commit is contained in:
Sasha Koshka 2024-07-26 18:58:16 -04:00
parent 6ea1679112
commit 0cdb116ec1

View File

@ -120,6 +120,7 @@ func (this *TextInput) handleKeyUp (key input.Key, numpad bool) bool {
} }
func (this *TextInput) handleScroll (x, y float64) bool { func (this *TextInput) handleScroll (x, y float64) bool {
if x == 0 { return false }
this.ScrollTo(this.ContentBounds().Min.Sub(image.Pt(int(x), int(y)))) this.ScrollTo(this.ContentBounds().Min.Sub(image.Pt(int(x), int(y))))
return true return true
} }