-
Notifications
You must be signed in to change notification settings - Fork 337
-
Notifications
You must be signed in to change notification settings - Fork 337
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
Mobile "touch" doesn't work properly #142
Comments
Just came in to check if someone has reported this and... low and behold - it's the first issue in the list. |
Yeah not sure how to mitigate this issue, haven't looked too far into it. I also noticed that it'll be nice if the component had the "default" styles scoped/inline with the component. Do you think it's a css issue? |
I haven't looked at the implementation. I guess it isn't a css issue and actually my problem is a bit different - it prevents the tapped thing to actually go through as action, meaning you need to tap it twice to get an actual action triggered, while on the desktop a single click would just work. I would take a stab at this, but am extremely busy at the moment, so if no one has fixed it by the time I get to it, I'll check it out. |
Hi @Sammyjo20 and @nicroto, do you have any example code? After that, I'm gonna try to look into it! Which Browser are you using? |
Hey @ivansieder, I personally just added it onto a button and used it as expected with the default styling you provided. I tried it with an iPhone 8 on iOS 12 using Safari. |
Can you please test on https://codesandbox.io/s/9j86qy64zy if it's working as you expect it to? |
@ivansieder Thanks for the reply. I think using the hover trigger partially resolves my problem, but for now I've switched off the tooltips on my app on mobile. I think the best way would be to have separate visual items (like a... "i"-buttons) to always show the tooltip on click, but the design doesn't really allow me to do such radical changes at this moment. I've changed the example a little bit to be able to see when the button tapping/clicking has actually produced a result (the action went through). On mobile Safari 10, the tooltip is pretty predictably shown the first time you tap, but then it's hard to find a way to show it, it's pretty unpredictable. Is there a better event to handle on the mobile browsers? Something like tap-hold gesture or something similar? |
Oh I see, so you wanna have the tooltip when you kinda "hover" (long-press) on the phone. Right? That's not what I think the tooltip is being thought to be doing. You can either implement some custom functionality using the "show" property and a "manual" trigger. This kind of showing a tooltip when long-pressing IMHO isn't something really user-friendly and should be avoided, as it can be something really user-blocking. |
For me I think I'd like it to appear on "click" if it's on mobile. I know that mobile browsers such a safari try to do this with hover events, but I think it's just buggy. I've tried the link provided and I've got a video to show you what it does. |
Hi @Sammyjo20, someone changed it from click to hover in the codesandbox. Please retry now, as it should be trigger on "click" now. |
That seems to be working much better now! It does require you to click “off” first, but it seems to work consistently now. Whoop whoop 🚀 |
Using the long-pressing "hover" is not guaranteed to be working, I guess that is something Safari-specific that would be needed to be implemented, as on my Android (OnePlus 5T) it works as it should. Generally, hover-functionality on mobile touch-devices is something tricky. Glad to have been able to help! If this issue is closed for you, I'd like to ask you to also close the issue itself. |
I agree. Good to work with you @ivansieder! |
On mobile (I tested with my iPhone 8), you can tap on the trigger for the tooltip and the tooltip appears correctly, but after tapping away and tapping again, it doesn't appear.
The text was updated successfully, but these errors were encountered: