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}) {
if (deltaY < 0 && this.scrollTop ||
deltaY > 0 && this.scrollTop + this.clientHeight < this.scrollHeight) {
return;
function headerOnScroll({target, deltaY, deltaMode, shiftKey}) {
while ((target = target.parentElement)) {
if (deltaY < 0 && target.scrollTop ||
deltaY > 0 && target.scrollTop + target.clientHeight < target.scrollHeight) {
return;
}
}
cm.display.scroller.scrollTop +=
// WheelEvent.DOM_DELTA_LINE