Commit db0ea715 authored by Wu Cheng-Han's avatar Wu Cheng-Han
Browse files

Update to improve editor performance by debounce checkEditorScrollbar event

parent 0db4358a
......@@ -1223,7 +1223,11 @@ function checkSyncToggle() {
}
}
function checkEditorScrollbar() {
var checkEditorScrollbar = _.debounce(function () {
editor.operation(checkEditorScrollbarInner);
}, 50);
function checkEditorScrollbarInner() {
// workaround simple scroll bar knob
// will get wrong position when editor height changed
var scrollInfo = editor.getScrollInfo();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment