fix scrolling over linter issues in usercss mode
This commit is contained in:
parent
c1dd196acd
commit
a66c377d8a
|
@ -333,11 +333,13 @@ function createSourceEditor(style) {
|
|||
}
|
||||
}
|
||||
|
||||
function headerOnScroll({deltaY, deltaMode, shiftKey}) {
|
||||
if (deltaY < 0 && this.scrollTop ||
|
||||
deltaY > 0 && this.scrollTop + this.clientHeight < this.scrollHeight) {
|
||||
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
|
||||
deltaMode === 1 ? deltaY * cm.display.cachedTextHeight :
|
||||
|
|
Loading…
Reference in New Issue
Block a user