From 26daab3e7766345a6d1c4f1bb21c8bb588547758 Mon Sep 17 00:00:00 2001
From: Jasper de Groot
Date: Thu, 22 Jan 2015 17:23:08 +0100
Subject: [PATCH 1/2] Core: Always reset browser default style for body
Fixes gh-7933
---
css/structure/jquery.mobile.core.css | 2 ++
1 file changed, 2 insertions(+)
diff --git a/css/structure/jquery.mobile.core.css b/css/structure/jquery.mobile.core.css
index d2614ffa796..780c78deb63 100644
--- a/css/structure/jquery.mobile.core.css
+++ b/css/structure/jquery.mobile.core.css
@@ -2,6 +2,8 @@
.ui-mobile,
.ui-mobile body {
height: 99.9%;
+ margin: 0;
+ padding: 0;
}
.ui-mobile fieldset,
.ui-page {
From 55ddf89a77c9a2d66c04bd46c520dfc0dc115b35 Mon Sep 17 00:00:00 2001
From: Gabriel Schulhof
Date: Thu, 22 Jan 2015 15:27:10 +0200
Subject: [PATCH 2/2] Core: Test silentScroll() more robustly
Closes gh-7931
---
tests/integration/core/core_scroll.js | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/tests/integration/core/core_scroll.js b/tests/integration/core/core_scroll.js
index 30b91b50859..c82595b5532 100644
--- a/tests/integration/core/core_scroll.js
+++ b/tests/integration/core/core_scroll.js
@@ -4,12 +4,13 @@
(function($){
var libName = "core",
- scrollTimeout = 20, // TODO expose timing as an attribute
+ scrollTimeout = 70, // TODO expose timing as an attribute
scrollStartEnabledTimeout = 150;
module(libName, {
- setup: function(){
- $("").appendTo("body");
+ setup: function() {
+ $( "").appendTo( "body" );
},
teardown: function(){
@@ -18,8 +19,9 @@
});
var scrollUp = function( pos ){
- $(window).scrollTop(1000);
- ok($(window).scrollTop() > 0, $(window).scrollTop());
+ $( window ).scrollTop( screen.height );
+ deepEqual( $( window ).scrollTop() > 0, true,
+ "After setting scrollTop, it is " + $( window ).scrollTop() );
$.mobile.silentScroll(pos);
};
@@ -27,7 +29,9 @@
scrollUp();
setTimeout(function(){
- deepEqual($(window).scrollTop(), 0);
+ deepEqual( $(window).scrollTop(), $.mobile.defaultHomeScroll,
+ "After parameterless silentScroll(), scrollTop is $.mobile.defaultHomescroll: " +
+ $.mobile.defaultHomeScroll );
start();
}, scrollTimeout);
});