Giter Club home page Giter Club logo

hammer-time's People

Contributors

arschmitz avatar bryanbraun avatar diogomafra avatar frederikbosch avatar julienmelissas avatar runspired avatar sculove avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

hammer-time's Issues

touch-action problem with Android browser

I have isolated a problem down to hammer-time on the stock Android browser. I mainly tested it on BrowserStack (HTC One M8 emulator) but can confirm it also happens on real HTC phones. Not sure if it affects the stock Android browser on other phones.

With just the below, tapping on the select box does not do anything. However, tapping on the space surrounding the select box triggers the native select dialog.

I'm not sure where to begin looking into this โ€“ does anyone have any ideas?

<!DOCTYPE html>
<html>
<head>
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <meta charset="utf-8">
  <title>Hammer Time</title>
  <script src="hammer-time.js"></script>
</head>
<body>
  <select style="touch-action: manipulation;">
    <option value="1">One</option>
  </select>
</body>
</html>

hadTouchNone

FYI The version with the undefined function hadTouchNone is still the downloadable version on your website!

hammer-time.min.js contains undefined function hasTouchNone

I downloaded hammer-time.min.js and when I run, I am getting an exception on my browser.

TypeError: this.hasTouchNone is not a function. (In 'this.hasTouchNone(a.target)', 'this.hasTouchNone' is undefined)

I downloaded the full Javascript (non-minified version) and it is working fine. When I checked the minified version code, the hasTouchNone function does not exist.

Webpack support?

At the time I can't find a way to require it via require() and Webpack. Is there some special way to do it or it must be implemented into the library?

Fails when clicking on SVG graphics

This happens when the target of the touch events is a SVG element, e.g. a button/link that contains an SVG icon.

A JavaScript error occurs on e.target.click(), as svg elements don't have that method.

`touch-action:none` prevents scrolling on some mobile devices

I am running into issues where I am unable to scroll on some devices when dragging my finger on elements that are affected by touch-action:none;

I confirmed this wasn't an event-collision issue by testing this on the hammer-time index.html page: when placing touch-action:none; on the body element, I am unable to scroll the page.

Confirmed Affected devices:

  • Google Nexus 6 running Android 5.0 (Chrome)
  • Moto E running Android 4.4 (Chrome)

[question] replacement of fastclick.js??

I am not an experienced front end developer, so wanted to confirm that hammer-time is a replacement for fastclick.js.

I was confused b/c fastclick is almost 6 times bigger than hammer-time.

Support touch-action="manipulation"

- var touchMatchNone = /touch-action[:][\s]*none[^;'"]*/;
+ var touchMatchNone = /touch-action[:][\s]*(none|manipulation)[^;'"]*/;

...again, I realize that you just hammered out this code a few hours ago, but figured it would be good to suggest improvements anyway!

Need to check `-ms-touch-action`

To make sure we properly support ie10 we should probably check ms-touch-action in addition to touch-action and advice people to apply both to elements.

Throws errors on mouseup if touch events (touchstart & touchend) aren't supported

For browsers that don't support the touchstart and touchend events, those handlers are never fired. Thus, this.pos never gets set and when the mouseup event is triggered, errors are thrown, like these:

In IE9:
image

Desktop Firefox:
image

Desktop Safari:
image

(browser support of touch events is currently mixed.)

Like #7, these are basically just desktop browsers that don't benefit from this plugin at all. I'm thinking the best way to handle this would be to bypass the hammer.time.install if touch events aren't supported.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.