Horizontal scroll bar 'shifting' while scrolling with touchpad/trackpad

Hi,

I encountered a problem while using a touchpad/trackpad.
Step:

  1. CodeMirror: Search/Replace Demo
  2. The code mirror block in the demo page does not react well while using a touchpad/trackpad to scroll vertically with two fingers: the horizontal scrollbar is easy to shift/move while (vertically) scrolling. Usually, it’s hard to scroll 100% vertically with a touchpad/trackpad, so I want to let the horizontal scrollbar be more “fixed” while using the touchpad/trackpad.
  3. Another example: Cursor problem, the code block’s horizontal scrollbar is not such easy to “shift” while scrolling.

Are there any methods to let codemirror act like Cursor problem while doing vertical scrolling using trackpad/touchpad? Thanks a lot.