[Fix] Improve code for drawing outline for focused element.