Coder Social home page Coder Social logo

Comments (9)

vin-ni avatar vin-ni commented on July 20, 2024

Maybe i should add a general :hover selector to the plugin? That way the plugin would also cover desktop devices and the galaxy note?

But then the plugin would force the same behavior on desktop devices. Maybe developers Would like some Fade in which works ux wise on Hover but Not on taphold.

Or I could add css
.cover:hover {
Visibility:hidden;
}
To the documentation?

What do you think?

Am 20.04.2016 um 07:38 schrieb BTMPL [email protected]:

Some devices have a way to trigger the hover state on their own - for example Samsung Galaxy Note comes with a pen, that triggers the :hover selector when hovering over an element.

In your demo the animations aren't triggered when that happens - might want to add it so that both touch and hover work.


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub

from hover-on-touch.

BTMPL avatar BTMPL commented on July 20, 2024

You might try adding a general :hover selector but restricting it with a media query to only target mobile?

from hover-on-touch.

vin-ni avatar vin-ni commented on July 20, 2024

ok, I might have to rewrite some stuff.
right now the plugin hides the elements. So I cant use the css:hover pseudo element.
I'll change everything to opacity change instead

from hover-on-touch.

vin-ni avatar vin-ni commented on July 20, 2024

I rewrote everything so there's now a fallback for devices like the galaxy note.
Unfortunately the rest of the script can't be applied by css (like restarting the gif).

from hover-on-touch.

vin-ni avatar vin-ni commented on July 20, 2024

@BTMPL I guess you have a galaxy note? Would you mind testing if it works?
I updated the demo :)

from hover-on-touch.

BTMPL avatar BTMPL commented on July 20, 2024

It mostly works, but there's a weird, probably will be hard to debug.

  1. Hover the pen over an element - the statte will trigger (animation plays etc)
  2. Put your finger over the same element and try to scroll the page, all while the pen is still hovering the element. It will not move (hovering over an element blocks the scroll by default, not part of your lib)
  3. Move the pen away.
  4. Try to scroll the page again - it will move.
  5. Hover the pen above the element - hovered state is not triggered, touching the element still works fine though

from hover-on-touch.

vin-ni avatar vin-ni commented on July 20, 2024

Hmm, so that rather a css bug no?
I'm wondering to add also a mouseover function to the script (for desktop(. I think that would also resolve the problem. Because here, css is interfering with javascript I think.
Do you think it would be useful to add a mouseover function?

  1. On the other hand coders might want to add their own mouseover function, which would get really complicated to make customable with a script
  2. I'm wondering if this plugin shouldn't stay touchdevice only. I dont want to build a hover library :P

from hover-on-touch.

BTMPL avatar BTMPL commented on July 20, 2024

I'd say it's a Browser / Software bug.

I wanted to debug this behaviour with Chrome Inspect Device but as soon as I connect to the tab running on my phone it loses all the hover effects of pen - no matter if it's on your demo or any other page (a simple codepen fails :hover too).

You might want to roll back to the previous commit and revisit this in the future if anyone else reports this issue.

from hover-on-touch.

vin-ni avatar vin-ni commented on July 20, 2024

ok :)

from hover-on-touch.

Related Issues (4)

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.