mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-09 01:08:39 +09:00
JS - make window.pageYOffset/pageXOffset/scrollX/scrollY double
This commit is contained in:
parent
e64a819dc3
commit
49ffafc979
16 changed files with 133 additions and 55 deletions
|
|
@ -23,7 +23,7 @@ addLoadEvent(function() {
|
|||
|
||||
setTimeout(function() {
|
||||
// Make sure that we're scrolled by 5000px
|
||||
is(window.pageYOffset, 5000, "Make sure we're scrolled correctly");
|
||||
is(Math.round(window.pageYOffset), 5000, "Make sure we're scrolled correctly");
|
||||
|
||||
// Scroll back up, and mess with the input box along the way
|
||||
var input = document.getElementById("WhyDoYouFocusMe");
|
||||
|
|
@ -38,14 +38,14 @@ addLoadEvent(function() {
|
|||
window.scrollTo(0, 5000);
|
||||
|
||||
setTimeout(function() {
|
||||
is(window.pageYOffset, 5000, "Sanity check");
|
||||
is(Math.round(window.pageYOffset), 5000, "Sanity check");
|
||||
|
||||
window.scrollTo(0, 0);
|
||||
input.focus();
|
||||
input.blur();
|
||||
|
||||
setTimeout(function() {
|
||||
isnot(window.pageYOffset, 0, "This time we shouldn't be scrolled up");
|
||||
isnot(Math.round(window.pageYOffset), 0, "This time we shouldn't be scrolled up");
|
||||
|
||||
SimpleTest.finish();
|
||||
}, 0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue