waterbearlang/waterbear — pull request #65 by dethe (2011-12-27 22:49:38+00:00)
Title: Fix scrolling Issue #64

Just changing $(document) to $(document.body) before calling .scrollLeft worked in Firefox, but not in Chrome. I changed it to $('.block_menu')[0].scrollIntoView() to scroll left and $('.stage')[0].scrollIntoView() to scroll right.

I noticed that scrolling between these with the mouse (or two-finger drag) also does not work, but I'm not sure if that's a bug or a feature. The whole scrolling between views was an artifact of a rush job to get some kind of IDE thrown together before JSConf and needs a rethink.

Note the [0] in the above fix: scrollIntoView is well supported across modern browsers, but it is a DOM method, not a jQuery method, so we have to get the DOM object out of jQuery before calling it.