check the active element's type before scrolling back on b/B