Last active
August 29, 2015 14:05
-
-
Save sbryfcz/1a735b07214d941ef798 to your computer and use it in GitHub Desktop.
Pull to Refresh/Scroll Bug
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html class="with-statusbar-overlay"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no, minimal-ui"> | |
<meta name="apple-mobile-web-app-capable" content="yes"> | |
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"> | |
<title>Scroll Bug</title> | |
<link rel="stylesheet" href="lib/css/framework7.css"> | |
<link rel="stylesheet" href="lib/css/framework7.themes.css"> | |
<style> | |
/*Styles for a single page so it doesn't "bounce" the whole page*/ | |
.page { | |
overflow: auto; | |
-webkit-overflow-scrolling: touch; | |
} | |
.page-content { | |
margin-bottom:1px; | |
} | |
</style> | |
</head> | |
<body> | |
<div class="statusbar-overlay"></div> | |
<div class="views"> | |
<div class="view view-main navbar-through toolbar-through"> | |
<div class="navbar"> | |
<div class="navbar-inner"> | |
<div class="center sliding">List View</div> | |
</div> | |
</div> | |
<div class="pages"> | |
<!-- Page, data-page contains page name--> | |
<div data-page="list" class="page"> | |
<!-- Scrollable page content--> | |
<div class="page-content index-page-content pull-to-refresh-content"> | |
<!-- Default pull to refresh layer--> | |
<div class="pull-to-refresh-layer"> | |
<div class="preloader"></div> | |
<div class="pull-to-refresh-arrow"></div> | |
</div> | |
<div class="content-block"> | |
Test Item | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
</body> | |
</html> | |
<script type="text/javascript" src="lib/framework7.js"></script> | |
<script type="text/javascript"> | |
var f7 = new Framework7({}); | |
//init the mainView | |
var mainView = f7.addView('.view-main', { }); | |
var $$ = Framework7.$; | |
$$('.pull-to-refresh-content').on('refresh', function () { | |
setTimeout(function () { | |
f7.pullToRefreshDone(); | |
}, 1000); | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment