add throttle to resize event
fix firefox key event