Fixes #17062. Fix autoscroll when navigating among focusable elements using TAB/SHIFT-TAB (desktop) or PREV/NEXT (mobile soft keyboard)
(cherry picked from commit fc5d66be761e7e2767e134af5475b3178e8a3973)