Giter Site home page Giter Site logo

Comments (6)

Itumac avatar Itumac commented on August 16, 2024

It appears the ontouchstart catch in the init function is getting called in (this version?) of chrome.

if('ontouchstart' in document) return this;

from bootstrap-hover-dropdown.

CWSpear avatar CWSpear commented on August 16, 2024

It works for me. I assume you're on Windows? Is your computer touch-enabled? This may be related to the infamous #68

from bootstrap-hover-dropdown.

CWSpear avatar CWSpear commented on August 16, 2024

I guess that doesn't make sense if it works in IE11...

from bootstrap-hover-dropdown.

Itumac avatar Itumac commented on August 16, 2024

I'm on Windows 7 enterprise. No special machine. Suspiciously like #68

I changed the line to

if(window.DocumentTouch && document instanceof DocumentTouch) return this;

as found on SO. hover work in chrome and in tap in the mobile emulation mode. But its early moments of testing.

from bootstrap-hover-dropdown.

whitneyland avatar whitneyland commented on August 16, 2024

Here's why this is broken: Chrome has started supporting ontouch events in all versions of the browser so the existing check for mobile does not work anymore and always returns true (if('ontouchstart' in document) return this;).

The reason Chrome can do this is because the CSS working group standardized media queries as the proper way to detect this. All the latest browser versions now support this standard.

For more information, this is how it should be properly done now:
https://drafts.csswg.org/mediaqueries-4/#mf-interaction

from bootstrap-hover-dropdown.

stormisover avatar stormisover commented on August 16, 2024

Also met the some issue. If this plugin does not work well on mobile browser, I suggest detecting the device type by navigator.userAgent.

from bootstrap-hover-dropdown.

Related Issues (20)

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.