I tried the setting selectionMode: 'single' doesn’t help though.
Next issue I am facing, when I press enter on the cell, I have a function to generate the next number in the hierarchy, due to which I reload the data into handsontable, even on insert row, scroll jumps and comes back to selected cell.
I am using merge cells feature, it gets called after the data is loaded, as the data is dynamic, merge cells is called in updateSettings function of handsontable. Please let me know if you need some more inputs.
Yeah, sure will do it and send it across. Since the data is dynamic and merging also is done dynamically, I will need some time to replicate and hard code the data to create the fiddle. Please bear with me.
We think our application css was disturbing the handsontable behavior. I removed all the css and used basic features, looks like jumping issue is resolved. I will get back if it occurs again.
We have this same issue in our project. The behavior of the tables should not be negatively affected by custom CSS, but it’s calculating things from the wrong starting position. This scroll jumping issue is part of a bigger problem where certain features of handsontable do not work correctly when the table is nested within a container, particularly a container that has scrolling enabled.
I reported on a similar issue on HOT Github issues regarding the rendering of TextEditor, SelectEditor, and Comments elements. The gist of it is that the placement of these elements should be calculated relative to the container element, not the document. You can read about my solution here.
By the way, this has still not been fixed since it was posted almost a year ago.
For this particular issue of scroll jumping, there is a workaround until the proper positions are calculated. So @vanivkulkarni, don’t remove your custom CSS that you probably need for your site layout. Instead, disable scrolling in the afterSelection callback.