This is because there is a bug where if you delete a focused element the focus is not deleted (bug 902942) so we need the focus to jump to a visible element first. The bug landed so I'll rebuild FF Nightly and see if we can remove it.