Add repositionOnScroll option
Fix a bug of reposition option
Reduce unneeded window event handling