Open zsxsoft opened 6 years ago
So fucking exciting.
node_modules/material-ui/internal/TouchRipple.js
, L260,
if (hasRipples)
to
if (true)
It will works correctly!!! But damn it, hasRipples
is always true when I click on it, wtf happened???????
Intersting, haha~
The bug can reproduce with Chrome and Edge, works fine in Firefox. Also,
anujs
(https://github.com/RubyLouvre/anu, another React-like library) and React works fine.User-Agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3192.0 Safari/537.36
User-Agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36 Edge/16.16251
Example: https://lucifier129.github.io/material-ui/build/#/
In Chrome, I have to double-click a![image](https://user-images.githubusercontent.com/2398785/29853312-c841a414-8d71-11e7-9272-51c32e06d065.png)
MenuItem
to trigger itsonClick
event withreact-lite
.I found the source of bug: https://github.com/callemall/material-ui/blob/master/src/internal/TouchRipple.js#L210. I replaced the
rippleGroup
to<div />
, the issue still exists.Then I tried to debug
react-lite
. The first click didn't triggerclick
event.So I wrapped![image](https://user-images.githubusercontent.com/2398785/29854097-5fe4455c-8d76-11e7-983d-cd64214d8801.png)
dispatchEvent
withsetTimeout
to wait 65ms, now the click triggered normally. DelayingbatchUpdate
is useless.I think it's maybe any function canceled mouseup event, but there're no function controlled event.![qq 20170830112958](https://user-images.githubusercontent.com/2398785/29854130-941f6842-8d76-11e7-83e0-12a6cc63c792.png)
Now I have no clue...