Fixes positioning when using setSelection() and setSelectionFromTop()