Stop your iOS webapp from bouncing around when scrolling
Report an issue and include the information below.
Please first check your application for code such as:
document.body.addEventListener('touchmove', function(event) {
event.preventDefault();
// or return false;
});
document.body.addEventListener('touchstart', function(event) {
event.preventDefault();
// or return false;
});
If you can't find anything, please create a Fiddle that reproduces the issue and include a link to it along with all of the information below.
Any reported issue must include the following information:
Steps:
- Scroll to the top of a div with
overflow: auto; width: 10000px;
- Try to scroll right
Expected:
It should not stop scrolling left/right when at the top of a scrollable div"
Observed:
You can scroll down, but you can't scroll left or right
Device:
iPhone 6, iOS 8.1.3
- List any touch-specific frameworks your page is using that might be conflicting
- Whether the problem happens on every device/OS version, or a specific model/version
- Hints, suspicicions, and gut feelings
- Any workarounds you found
Notes:
I'm also using Sencha Touch on the page.
This doesn't seem to happen on my other phone running iOS 7.
You contributions are welcome! Please follow the guidelines below
An issue must exist before you start working on a fix or a feature.
First, search the issues to see if one has already been filed for what you're about to work on.
If not, file an issue with the following information.
For bugs:
- Steps to reproduce
- Expected behavior
- Observed behavior
- Device/OS version
- Additional information such as workarounds
- A Fiddle or code sample that reproduces the issue
For features:
- The feature
- Why
- Code samples showing the proposed API
- Notes on any impact you forsee the feature having
Fork iNoBounce to your Github account and clone it to your local machine.
Be sure to add an upstream remote:
git remote add upstream [email protected]:lazd/iNoBounce.git
Create a branch from the lastest master named issue/#
, where # is the issue number you're going to work on:
git checkout master
git pull upstream master
git checkout -b issue/10
Install dependencies and start developing:
npm install
npm run watch
The test suite will run automatically each time you save a file.
Be sure to match the existing coding style as well as comment all that clever code you wrote as a result of a stoke of pure genius. Others may not understand your beautiful, elegant solution.
Include tests for everything you change, and test edge cases!
- If you fix a bug, include a test that proves you fixed it.
- If you added a feature, include a test that makes sure the feature works.
It's helpful if you make individual commits for atomic pieces of your contribution. This helps write a living history of the repository in the form of commit messages, and makes it much easier ot understand why specific changes were made.
For instance, if you're working on a bug that affects two parts of the project, it may useful to have two commits for each part. Didn't make atomic commits? Don't sweat it, your contribution is still welcome!
Your commit message should contain the issue number it closes or fixes.
If the commit is only part of the solution:
Don't assume overflow values, related to #10
For commits that fix bugs:
Specifically check for overflow-y, fixes #10
For commits that implement features:
Support rubberbanding when scrolled to the top or bottom, closes #10
Don't include commits with messages like Fix typo, oops!
, please squash them into previous commits to reduce history pollution.
Push your branch to your fork:
git push -u origin issue/10
Then, send a pull request against the master
branch of lazd/iNoBounce.