marijnh/CodeMirror2 — pull request #534 by njx (2012-05-10 03:58:44+00:00)
Title: Fix flickering during vertical scrolling #3

Third time's the charm :)

This is basically the same approach as in https://github.com/marijnh/CodeMirror2/pull/473, except that all browsers/versions now use the same code (there's no more option to turn off the new scrolling code), and we just reference `scrollbar` directly whenever we need to access scrollTop/scrollHeight instead of introducing a separate `vScrollElt` variable. There are also a couple of tweaks to make things work in IE 7/8. Firefox still has the issue that throw scrolling feels slightly less smooth towards the end because of the low resolution of mousewheel events.

I've done light sanity testing in IE 7/8/9 (Win 7) and in Safari/Firefox/Chrome on Snow Leopard, as well as on Lion with and without a mouse plugged in. (There are slight glitches if you plug or unplug a mouse without refreshing CM, because the scrollbar behavior changes as soon as you plug/unplug the mouse and the layout doesn't reflect that, but they're minor.)

We can do heavier testing once we know you're comfortable with the changes in general. Let me know if you see any problems.