Datatables jumps to top of page on reloading when using Google Chrome.
Datatables jumps to top of page on reloading when using Google Chrome.
Hello
I've been developing a solution in the last months using this amazing plugin, with really excellent results; but i came across an issue i haven't been able to sort out.
The web app has multiple tables which displays around 100~500 rows, without pagination (as per customer request). Most tables display the data correctly, and when the user take some action which triggers a reload of data (which is loaded manually via ajax and loaded into the table using rows().add() ), the table data updates correctly and the scroll position is mantained.
However, in the case i have a table which has some input element within a row (for example an <input>, <select> or <button>), and the reload event is triggered from one of this elements, the page scroll jumps to the top after the reload ONLY WHEN the user is using Google Chrome.
i've tested this behavior and works correctly (the page scroll position is mantained) in Firefox 44, IE11 and Safari 9, but with Chrome v48 (both windows an osx) the scroll jumps to the top of the page.
I've built a jsfiddle on https://jsfiddle.net/ahormazabal/9jsv3xmc/ which demonstrates the issue. You may notice that the example provided has checkbox and buttons in every row, and a "Reload" button at the end of the page. When you hit a button or checkbox inside the table, the scroll jumps, but if you press the button at the end, the scroll is kept. Al buttons trigger the same js function.
I would appreciate any advise and/or help regarding this issue.
Many Thanks!