This is a repo to demonstrate a bug in ionic@1.0.1
, documented at: ionic-team/ionic-framework#4008
This repo is built with
generator-mcfly
our yeoman generator that gives you a pre-wired gulp & browserify build system for angular apps and options to automatically integrate ionic.
Steps to reproduce:
- Clone the repo &
cd
into the directory
git clone https://github.com/jskrzypek/4008-preventDefault#master && cd 4008-preventDefault
- Install npm & bower dependencies
npm install && bower install
- Use git to apply a patch to stick some
console.log
messages on theDrag
handler
git apply ionic.js.patch
- Use our gulp task to build the distributed code (using browserify)
gulp dist
cd
into the directory where the ionic project sits
cd dist/app/dev
- Add platforms
ionic platform add android ios
- Run/build for either platform with
ionic run ...
. Note that I am currently only able to reproduce this bug in ios. - Attach your console (safari developer view for
ios
or chrome://inspect#devices forandroid
) - In the tab labeled
ion-list
you should be able to scroll fine via dragging, and should see messages logged by the drag handler from our patch. - Switch to the tab labeled
ion-content
. On ios you will not be able to scroll via dragging, but messages will be logged to the console showing us that theev.preventDefault()
method is being called on these legitimate drag events. - Click the red heart in the upper-right corner. This will run the
drag-handler.js
script that swaps out the current version of the handler for the one with my suggested fixes. - Now you can scroll just fine in the
ion-content
tab andev.preventDefault()
is not being called when it shouldn't be.
Recent changes can be viewed on Github on the Releases Page