fix scrolling over linter issues in usercss mode

This commit is contained in:
tophf 2017-12-28 07:01:43 +03:00
parent c1dd196acd
commit a66c377d8a

View File

@ -333,10 +333,12 @@ function createSourceEditor(style) {
} }
} }
function headerOnScroll({deltaY, deltaMode, shiftKey}) { function headerOnScroll({target, deltaY, deltaMode, shiftKey}) {
if (deltaY < 0 && this.scrollTop || while ((target = target.parentElement)) {
deltaY > 0 && this.scrollTop + this.clientHeight < this.scrollHeight) { if (deltaY < 0 && target.scrollTop ||
return; deltaY > 0 && target.scrollTop + target.clientHeight < target.scrollHeight) {
return;
}
} }
cm.display.scroller.scrollTop += cm.display.scroller.scrollTop +=
// WheelEvent.DOM_DELTA_LINE // WheelEvent.DOM_DELTA_LINE