Fix legend focus/defocus - #558