fix focus state when embed in another window.