1
0
mirror of synced 2025-12-13 18:08:00 +08:00

fix: fixes firefox scroll-linked effect issue

This commit is contained in:
Jamie Peabody
2023-04-23 10:29:16 +01:00
parent fbe670c92a
commit a01cadbf64

View File

@@ -440,7 +440,10 @@ CodeMirrorDiffView.prototype.bind = function(container) {
trace('event#lhs-scroll');
}
}
this._scrolling({ side: 'lhs' });
// firefox scroll-linked effect render issue
setTimeout(() => {
this._scrolling({ side: 'lhs' });
}, 1);
});
this.editor.rhs.on('change', (instance, ev) => {
if (this.settings._debug) {
@@ -459,7 +462,10 @@ CodeMirrorDiffView.prototype.bind = function(container) {
trace('event#rhs-scroll');
}
}
this._scrolling({ side: 'rhs' });
// firefox scroll-linked effect render issue
setTimeout(() => {
this._scrolling({ side: 'rhs' });
}, 1);
});
// resize event handeler