jskrzypek / 4008-preventDefault

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

4008-preventdefault

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:

  1. Clone the repo & cd into the directory
git clone https://github.com/jskrzypek/4008-preventDefault#master && cd 4008-preventDefault
  1. Install npm & bower dependencies
npm install && bower install
  1. Use git to apply a patch to stick some console.log messages on the Drag handler
git apply ionic.js.patch
  1. Use our gulp task to build the distributed code (using browserify)
gulp dist
  1. cd into the directory where the ionic project sits
cd dist/app/dev
  1. Add platforms
ionic platform add android ios
  1. Run/build for either platform with ionic run .... Note that I am currently only able to reproduce this bug in ios.
  2. Attach your console (safari developer view for ios or chrome://inspect#devices for android)
  3. 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.
  4. 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 the ev.preventDefault() method is being called on these legitimate drag events.
  5. 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.
  6. Now you can scroll just fine in the ion-content tab and ev.preventDefault() is not being called when it shouldn't be.

Usage

Testing

Changelog

Recent changes can be viewed on Github on the Releases Page

License

About


Languages

Language:JavaScript 83.7%Language:HTML 10.4%Language:Shell 5.7%Language:CSS 0.2%