mirror of
https://github.com/atom/atom.git
synced 2026-01-23 13:58:08 -05:00
Editor.scroller WheelEvents are forwarded to Editor.scrollbar
This commit is contained in:
@@ -204,6 +204,14 @@ class Editor extends View
|
||||
@insertText(e.originalEvent.data)
|
||||
false
|
||||
|
||||
@scroller.on 'mousewheel', (e) =>
|
||||
e = e.originalEvent
|
||||
if e.wheelDeltaY
|
||||
newEvent = document.createEvent("WheelEvent");
|
||||
newEvent.initWebKitWheelEvent(0, e.wheelDeltaY, e.view, e.screenX, e.screenY, e.clientX, e.clientY, e.ctrlKey, e.altKey, e.shiftKey, e.metaKey)
|
||||
@scrollbar.get(0).dispatchEvent(newEvent)
|
||||
false
|
||||
|
||||
@scrollbar.on 'scroll', =>
|
||||
@updateLines()
|
||||
@scroller.scrollTop(@scrollbar.scrollTop())
|
||||
|
||||
@@ -43,7 +43,6 @@
|
||||
bottom: 0;
|
||||
width: 10px;
|
||||
overflow-y: auto;
|
||||
background: blue;
|
||||
}
|
||||
|
||||
.editor .scroller {
|
||||
|
||||
Reference in New Issue
Block a user