Fixes endless loop when setting focus to activate ribbon