update _getCurrentWindow

In order to maintain Firefox compatibility, the _getCurrentWindow
function must return a JQuery object, otherwise the auto scrolling does not
work in Firefox.