fix window jumping bug on click.