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

Prevent default page action when starting a gesturemove #1557

Merged
merged 1 commit into from
Jan 21, 2014

Conversation

andrewnicols
Copy link
Contributor

This prevents some browsers from selecting the page text during a gesture.

This prevents some browsers from selecting the page text during a gesture.
@andrewnicols
Copy link
Contributor Author

Unit test results from yeti:

nicols@lime:~/git/yui3/src$ yeti dd/tests/unit/index.html
  Agent connected: Chrome (31.0.1650.63) / Windows 8 from 121.45.249.164
  Agent connected: Chrome (31.0.1650.18) / iOS 7.0.4 from 121.45.249.164
  Agent connected: Firefox (26.0) / Mac OS from 121.45.249.164
  Agent connected: Chrome (31.0.1650.63) / Mac OS from 121.45.249.164
  Agent connected: Internet Explorer (10.0) / Windows 8 from 121.45.249.164
  Agent connected: Safari (7.0.1) / Mac OS from 121.45.249.164
  Agent connected: Safari (7.0) / iOS 7.1 from 121.45.249.164
  Agent connected: Firefox (26.0) / Windows 8 from 121.45.249.164
  Agent connected: Chrome (31.0.1650.59) / Linux from 149.254.180.245
  Agent connected: Chrome (31.0.1650.59) / Linux from 217.114.58.161
  Agent connected: Chrome (34.0.1784.0) / Mac OS from 121.45.249.164
  Agent connected: Safari (6.1) / Mac OS from 83.100.191.135
✓ Testing started on Chrome (31.0.1650.63) / Windows 8, Chrome (31.0.1650.18) / iOS 7.0.4, Firefox (26.0) / Mac OS, Chrome (31.0.1650.63) / Mac OS, Internet Explorer (10.0) / Windows 8, Safari (7.0.1) / Mac OS, Safari (7.0) / iOS 7.1, Firefox (26.0) / Windows 8, Chrome (31.0.1650.59) / Linux, Chrome (31.0.1650.59) / Linux, Chrome (34.0.1784.0) / Mac OS, Safari (6.1) / Mac OS
► Testing... - 0% complete (0/12) 35.27 beats/sec   Agent disconnected: Safari (6.1) / Mac OS from 83.100.191.135
✗ Error: undefined
  User-Agent: Safari (6.1) / Mac OS
✓ Agent completed: Safari (6.1) / Mac OS
✓ Agent completed: Safari (7.0.1) / Mac OS
✓ Agent completed: Safari (7.0) / iOS 7.1
✓ Agent completed: Chrome (31.0.1650.18) / iOS 7.0.4
✓ Agent completed: Chrome (34.0.1784.0) / Mac OS
✓ Agent completed: Chrome (31.0.1650.63) / Mac OS
✓ Agent completed: Firefox (26.0) / Mac OS
✓ Agent completed: Chrome (31.0.1650.63) / Windows 8
✓ Agent completed: Firefox (26.0) / Windows 8
✓ Agent completed: Internet Explorer (10.0) / Windows 8
► Testing... - 75% complete (9/12) 29.02 beats/sec ETA 15 seconds   Agent connected: Chrome (30.0.1599.114) / Linux from 217.114.58.37
✗ Script error: Uncaught TypeError: Cannot read property 'Console' of undefined
  URL: src/dd/tests/unit/index.html
  Line: 43
  User-Agent: Chrome (31.0.1650.59) / Linux
  Agent disconnected: Chrome (31.0.1650.59) / Linux from 217.114.58.161
✗ Error: undefined
  User-Agent: Chrome (31.0.1650.59) / Linux
✓ Agent completed: Chrome (31.0.1650.59) / Linux

✗ Error: Agent timed out running test: /agent/1389710674508250944/batch/1389711101592418898/test/src/dd/tests/unit/index.html
  User-Agent: Chrome (31.0.1650.59) / Linux
✓ Agent completed: Chrome (31.0.1650.59) / Linux
✓ 423 tests passed! (5 minutes, 1 second)

I'm fairly sure that the warnings relate to browsers dropping off during testing. I live in Australia and some of the kind victims doing my testing are located half way across the world. Latency is a little high and yeti does not cope well with it.

@clarle
Copy link
Collaborator

clarle commented Jan 15, 2014

This looks good and is the same suggestion that @rgrove proposed in #693.

👍, and will merge this in after 72 hours or reviewer 👍.

@andrewnicols
Copy link
Contributor Author

Are we good to pull this now @clarle?

Cheers,

Andrew

@clarle clarle merged commit af0606b into yui:dev-master Jan 21, 2014
@clarle
Copy link
Collaborator

clarle commented Jan 21, 2014

Merged into dev-master and dev-3.x.

Thanks again for the contribution, @andrewnicols!

clarle pushed a commit that referenced this pull request Jan 21, 2014
@sgilligan
Copy link

I'm seeing a side effect of this where the momentum scrolling on ios no longer works. Please see #1716.

andrewnicols added a commit to andrewnicols/yui3 that referenced this pull request Mar 21, 2014
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.
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.

3 participants