azuredatastudio
azuredatastudio copied to clipboard
Scrolling multiple result sets leads to console error
- Azure Data Studio Version: main + https://github.com/microsoft/SlickGrid.ADS/pull/22
- OS Version: Any
When fixing styling of slick-viewport, to allow scroll to work for parent container, we notice a different issue in ScrollableView class.
Steps to Reproduce:
- Scroll multiple result sets multiple times up/down
- Scrolling works now, most of the times.
- Notice console error (sometimes when scrolling down)
2023-11-22 16:10:49.439 [error] Failed to execute 'insertBefore' on 'Node': The node before which the new node is to be inserted is not a child of this node.: Error: Failed to execute 'insertBefore' on 'Node': The node before which the new node is to be inserted is not a child of this node.
at ScrollableView.insertItemInDOM (vscode-file://vscode-app/c:/Users/cmalhotra/Code/GitHub/azuredatastudio/out/sql/base/browser/ui/scrollableView/scrollableView.js:189:40)
at ScrollableView.render (vscode-file://vscode-app/c:/Users/cmalhotra/Code/GitHub/azuredatastudio/out/sql/base/browser/ui/scrollableView/scrollableView.js:168:26)
at ScrollableView.onScroll (vscode-file://vscode-app/c:/Users/cmalhotra/Code/GitHub/azuredatastudio/out/sql/base/browser/ui/scrollableView/scrollableView.js:146:18)
at Emitter._deliver (vscode-file://vscode-app/c:/Users/cmalhotra/Code/GitHub/azuredatastudio/out/vs/base/common/event.js:851:26)
at Emitter.fire (vscode-file://vscode-app/c:/Users/cmalhotra/Code/GitHub/azuredatastudio/out/vs/base/common/event.js:880:22)
...
When this error occurs, scrolltop position doesn't change for parent container and render doesn't complete.
If we try to simply try-catch error, we can see that results disappear and are not added to scrollable view. So, something has been wrong in this design that never surfaced before.
/cc @alanrenmsft let me know if there are any known design limitations in this area, or I can attempt to fix this.