{"action":"created","issue":{"url":"https://api.github.com/repos/Mottie/tablesorter/issues/1166","repository_url":"https://api.github.com/repos/Mottie/tablesorter","labels_url":"https://api.github.com/repos/Mottie/tablesorter/issues/1166/labels{/name}","comments_url":"https://api.github.com/repos/Mottie/tablesorter/issues/1166/comments","events_url":"https://api.github.com/repos/Mottie/tablesorter/issues/1166/events","html_url":"https://github.com/Mottie/tablesorter/issues/1166","id":136935600,"number":1166,"title":"Updating table, sticky headers and maintaining the scrolling position.","user":{"login":"Herst","id":1042176,"avatar_url":"https://avatars.githubusercontent.com/u/1042176?v=3","gravatar_id":"","url":"https://api.github.com/users/Herst","html_url":"https://github.com/Herst","followers_url":"https://api.github.com/users/Herst/followers","following_url":"https://api.github.com/users/Herst/following{/other_user}","gists_url":"https://api.github.com/users/Herst/gists{/gist_id}","starred_url":"https://api.github.com/users/Herst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Herst/subscriptions","organizations_url":"https://api.github.com/users/Herst/orgs","repos_url":"https://api.github.com/users/Herst/repos","events_url":"https://api.github.com/users/Herst/events{/privacy}","received_events_url":"https://api.github.com/users/Herst/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Mottie/tablesorter/labels/Demo","name":"Demo","color":"DDDDDD"},{"url":"https://api.github.com/repos/Mottie/tablesorter/labels/How%20To...","name":"How To...","color":"fbca04"},{"url":"https://api.github.com/repos/Mottie/tablesorter/labels/Widget","name":"Widget","color":"207de5"},{"url":"https://api.github.com/repos/Mottie/tablesorter/labels/Widget-StickyHeaders","name":"Widget-StickyHeaders","color":"207de5"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-02-27T16:04:56Z","updated_at":"2016-03-02T05:06:59Z","closed_at":null,"body":"To summarize a bit the discussions yesterday in the IRC between @TheSin- and me.\r\n\r\nI have the following example of a table with changing content: http://jsfiddle.net/pcmsL943/28/\r\nIn all browsers I tested it with (Chrome, Fx, IE, Edge) I can scroll to a position and I will stay at this position even if the table updates (I don't care about the position when something is filtered BTW).\r\n\r\nNow once I enable one of the stickyHeaders widgets the situation changes, suddenly the positions gets reset to the top-corner on every update, see: http://jsfiddle.net/pcmsL943/29/\r\n\r\nA somewhat hacky workaround where I save the scrolling position to restore it later seems to work: http://jsfiddle.net/pcmsL943/30/, but this solution far from nice in part because it hinders scrolling while the update is running and the jump is visible in most browsers. Also according to @TheSin- this seems not to work in Safari.\r\n\r\n@TheSin- advised me to clone the table header instead and pointed me to a proof of context of his: http://codepen.io/TheSin/pen/xkgKj. Maybe I am going try to implement this solution or I will simply ditch the sticky headers plugin altogether. Or maybe this thread here will lead to some other solutions, e.g. why would the \"update\" event even cause the whole document to be scrolled? Shouldn't the CSS3 sticky headers plugin not just be simply moving the table headers into a div with `position: sticky` set (with fallbacks for browsers not supporting it)?"},"comment":{"url":"https://api.github.com/repos/Mottie/tablesorter/issues/comments/191064405","html_url":"https://github.com/Mottie/tablesorter/issues/1166#issuecomment-191064405","issue_url":"https://api.github.com/repos/Mottie/tablesorter/issues/1166","id":191064405,"user":{"login":"Mottie","id":136959,"avatar_url":"https://avatars.githubusercontent.com/u/136959?v=3","gravatar_id":"","url":"https://api.github.com/users/Mottie","html_url":"https://github.com/Mottie","followers_url":"https://api.github.com/users/Mottie/followers","following_url":"https://api.github.com/users/Mottie/following{/other_user}","gists_url":"https://api.github.com/users/Mottie/gists{/gist_id}","starred_url":"https://api.github.com/users/Mottie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mottie/subscriptions","organizations_url":"https://api.github.com/users/Mottie/orgs","repos_url":"https://api.github.com/users/Mottie/repos","events_url":"https://api.github.com/users/Mottie/events{/privacy}","received_events_url":"https://api.github.com/users/Mottie/received_events","type":"User","site_admin":false},"created_at":"2016-03-02T05:06:59Z","updated_at":"2016-03-02T05:06:59Z","body":"Has this been resolved? Can I close this issue?"}}