javascript - Setting window.pageYOffset in Firefox doing nothing? -
i'm using recent version of firefox.
i'm trying window scroll position before submitting form.
in html head of page there's code: if (sessionstorage.top !== null) { window.pageyoffset = sessionstorage.top; }
and later validation function called has following line in it: sessionstorage.top = window.pageyoffset;
since function submits form page automatically reloaded.
i've verified validation function called, executing way through including line above.
i've verified code in html head being executed (including inside if statement - sessionstorage.top
not null.
i've verified both sessionstorage.top
, window.pageyoffset
set 630.
yet window stays @ position 0 (zero).
i've tried setting window.pageyoffset
directly 630 , nothing. page stays @ topmost (default) position.
what missing?
because readonly? use window.scrolltop = offsetvalue;
set scroll position.
Comments
Post a Comment