Avoid scrollTop call in hot code
This seems to have been added in f6d5abf but it's not clear why, scroll APIs
seem to work fine without it and using a DOM API here is causing slowness
This commit is contained in:
@@ -143,12 +143,6 @@ export class Viewport extends Disposable implements IViewport {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// If element's scroll top changed, this can happen when hiding the element
|
|
||||||
if (this._lastScrollTop !== this._viewportElement.scrollTop) {
|
|
||||||
this._refresh(immediate);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// If row height changed
|
// If row height changed
|
||||||
if (this._renderDimensions.scaledCellHeight !== this._currentScaledCellHeight) {
|
if (this._renderDimensions.scaledCellHeight !== this._currentScaledCellHeight) {
|
||||||
this._refresh(immediate);
|
this._refresh(immediate);
|
||||||
|
|||||||
Reference in New Issue
Block a user