JS - make window.pageYOffset/pageXOffset/scrollX/scrollY double

This commit is contained in:
janekptacijarabaci 2017-08-10 18:01:49 +02:00 committed by Roy Tam
commit 49ffafc979
16 changed files with 133 additions and 55 deletions

View file

@ -27,7 +27,7 @@ function childLoad2() {
// Save the Y offset. For sanity's sake, make sure it's not 0, because we
// should be at the bottom of the page!
let origYOffset = cw.pageYOffset;
let origYOffset = Math.round(cw.pageYOffset);
ok(origYOffset != 0, 'Original Y offset is not 0.');
// Scroll the iframe to the top, then navigate to #bottom again.
@ -37,7 +37,7 @@ function childLoad2() {
// bottom again.
cw.location = cw.location + '';
is(cw.pageYOffset, origYOffset, 'Correct offset after reloading page.');
is(Math.round(cw.pageYOffset), origYOffset, 'Correct offset after reloading page.');
SimpleTest.finish();
}