Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move preventDefault to gesturemovestart (Fixes #1716) #1721

Merged
merged 1 commit into from
Mar 25, 2014

Conversation

andrewnicols
Copy link
Contributor

Android browsers require that we prevent the default browser action on the start of drag. We tried this in #693/#1557, but this broke in other ways for other browsers.

The issue stems from preventDefault being called on the document instead of the Node.

This commit moves the preventDefault to the gesturemovestart in the prototype for DD.Drag so that the page is still scrollable.

Android browsers require that we prevent the default browser action on the
start of drag. We tried this in yui#693/yui#1557, but this broke in other ways
for other browsers.

The issue stems from preventDefault being called on the document instead of
the Node.

This commit moves the preventDefault to the gesturemovestart in the
prototype for DD.Drag.
@yahoocla
Copy link

CLA is valid!

@andrewnicols
Copy link
Contributor Author

Tested (successfully) against:

  • MacOS 10.9.2:
    • Safari
    • Firefox
    • Chrome
  • iOS:
    • 7.0 Safari
    • 7.1 Safari
    • 7.1 Chrome
  • Android:
    • 4.4 (Kitkat) Stock
  • Windows 8.1:
    • IE 11
    • Chrome
    • Firefox

I've tried against the following examples:

  • Simple Drag
  • Drag - Node plugin
  • Drag Delegation

@tilomitra has worked on this with me and tested on some additional browsers too.

@tilomitra
Copy link
Contributor

It also works in Android 4.3. I'm 👍 with this change. Waiting to see what reviewers think.

@tilomitra
Copy link
Contributor

Merging this in since 72 hours have passed.

tilomitra added a commit that referenced this pull request Mar 25, 2014
Move preventDefault to gesturemovestart (Fixes #1716)
@tilomitra tilomitra merged commit 76d4b2f into yui:dev-3.x Mar 25, 2014
@okuryu okuryu added this to the Sprint 13 milestone Mar 26, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants