-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Ripple: Has no effect on touch enabled desktop screens #4909
Comments
Note that Ripple works fine on other Prime products - PrimeNG, PrimeVue |
@zawasp can you try this reproducer: https://codesandbox.io/s/primereact-demo-forked-r6zksp?file=/src/App.js I am using Chrome and Ripple is working fine? |
@melloware tried your demo, same behaviour as in the video I attached (with Chrome, Brave, Edge on Windows 11). The strange thing is even your demo works fine if I turn on developer tools and switch to mobile in the device toolbar. LE: ripple works fine on native mobile devices as well, and as well on Chrome on Ubuntu. Can't figure out what's happening on Windows. |
So weird I am using windows 11 and chrome. Can you check your version of chrome? I am on 116. |
See all browser versions in the first post. I'm on latest on all. |
This is so weird I can't reproduce on either of my Windows 11 machines. using latest Chrome. Version 116.0.5845.180 (Official Build) (64-bit) |
Yeah I know, I'm puzzled as well. I tried with incognito, disabled all browser extensions as well. Really odd. Maybe set this as lower priority and wait if someone else has the same issue. |
Those were going to be my next suggestions to disable browser plugins etc. What I don't get is why does it start working when you open Dev Tools and go to mobile mode? |
It's very weird. I have checked your code in Linux/Firefox/Chrome and works perfectly. Look this @melloware: Component Menu in my display, the hover effect is not working. doesnt.work.mp4But If I check in another display, works perfectly. works.mp4Sorry for the quality of the video, but was the only way that I can show this problem. |
weird so it must be a display setting causing the ripple not to show! |
So why does it work when turning on Developer Tools and switching to mobile? What could possibly that do to the browsers? |
We still have no idea why but @SoyDiego was just chiming in he has two monitors and it works on one but not the other. So its SOMETHING environmental? Resolution? Percentage scale? |
Good point, I'll try with different scaling. I'm on a HDPI screen. |
That might explain why switching to mobile makes it work if the browser is somehow changing the resolution or scale or something like that? |
Or try different display. I have my laptop and another display and If I put the window in the middle of both I can see the hover effect on the left but not on the right. |
Ok I found the issue. It doesn't work on touch enabled screens. I have a touch enabled Dell XPS 4K laptop. I disabled the touch screen and it started working. Probably the error originates from here: LE: what's funny is that it works if I touch the screen in the Ripple zone. But not with a mouse / touchpad. |
Awesome now I can fix it!! |
I think I know the correct way to handle this the "React" way |
Good job, finally was something with the Display 😂 |
Sorry for bother in this post again, @zawasp could you confirm me if the same problem is PrimeNG and PrimeVue? I guess so, but I don't have a touch display and with developer tools the touch is working ok. Thanks again and nice researching job! |
OK I researched the issue arises from this: #3526 Which if you read Windows is the only OS that enabled both Touch and Mouse events: https://stackoverflow.com/questions/13655919/how-to-bind-both-mousedown-and-touchstart-but-not-respond-to-both-android-jqu |
PR submitted. |
Describe the bug
Ripple effect doesn't appear to work on touch enabled desktop screens when using the mouse/touchpad. It does work by touching the screen.
This can be seen even on the demo of PrimeReact homepage.
Here's a link to a video for this behaviour
Ripple not working
This is happening on all Chrome based browsers (Edge, Brave, Chrome) on Windows 11.
Reproducer
https://primereact.org/
PrimeReact version
9.6.2
React version
18.x
Language
TypeScript
Build / Runtime
Next.js
Browser(s)
Chrome Version 116.0.5845.180 (Official Build) (64-bit), Edge 116.0.1938.76 (Official build) (64-bit), Brave Version 1.57.62 Chromium: 116.0.5845.180 (Official Build) (64-bit),
Steps to reproduce the behavior
OR
Go to any component demo which supports ripple and enable it in the theme (E.g. button)
Result: no ripple effect is visible
Expected behavior
Ripple effect should be visible
The text was updated successfully, but these errors were encountered: