If I am scrolling my page and the update gets triggered by the timer the page/scrollposition slightly jumps/jitters/lags. I am using MaintainScrollPositionOnPostBack
on my pages and it works fine if I am stationary somewhere on the page, no jump/jitter/lag on update then. Any ideas on how to fix it while scrolling too? Maybe pause the timer while scrolling if possible?
Asked
Active
Viewed 199 times
1

Skillzore
- 748
- 7
- 21
2 Answers
0
There is workaround for that issue. You pass to controller element you had focus on and then on page load you focus back to that element.
Find focus:
var focusedElement = document.activeElement;
focusedElement you send to server (controller or whatever) via post/get or something.
Focus back on page load:
$(document).ready(function() {
$("#" + recivedFocusedElement).focus();
}
recivedFocusedElement you recive from server.

Denis Kotolenko
- 1
- 2
-
What would `document` be here? My page is pretty simple, it is a table filled with server statuses. The table is placed in an updatepanel and that's about it. – Skillzore Jun 22 '16 at 11:28