Closed rsnzh closed 1 year ago
This pull request is automatically built and testable in CodeSandbox.
To see build info of the built libraries, click here or the icon next to each commit SHA.
Latest deployment of this branch, based on commit 7e53d3f46ac82d6b9831ae96babc2a34207217ac:
Sandbox | Source |
---|---|
React | Configuration |
Hey @rsnzh
You are changing the code style of the updated files, that's not acceptable.
Hey @rsnzh CI is still failing.
Anyway, I couldn't replicate the behavior you mentioned. Load this URL: https://nwdc5n.csb.app/controlled, and when you click the menu through the spotlight, it is only called once.
Also, I'm against imperative actions, such as element.click()
. This can lead to other problems...
Also, if you check the Modal demo, the spotlight click allows the input to be selected, so it's not triggering a click in the element.
Hey @rsnzh CI is still failing.
Anyway, I couldn't replicate the behavior you mentioned. Load this URL: https://nwdc5n.csb.app/controlled, and when you click the menu through the spotlight, it is only called once.
Also, I'm against imperative actions, such as
element.click()
. This can lead to other problems...
You can reproduce twice clicks on touch devices, just as issues #855 #861 .
element.click()
might not be the best, but is what I currently think of .
Also, if you check the Modal demo, the spotlight click allows the input to be selected, so it's not triggering a click in the element.
The result is not the same on touch devices and pc browsers.
maybe add the spotlightFocus
props, if set true trigger element.focus()
You can reproduce twice clicks on touch devices, just as issues #855 #861 .
Yeah, I tested in Chrome and Safari on an iPhone. I closed these issues since I can't replicate them. Can you try it again?
Yeah, I tested in Chrome and Safari on an iPhone. I closed these issues since I can't replicate them. Can you try it again?
I try it on Android Edge and Chrome Desktop and not working expected. edge: chrome:
The solution doesn't cover all cases. The target
isn't necessarily the element the user wants to be triggered and imperative calls to the click
method could throw an error.
1.remove css pointer-events and mousemove event 2.add click method on spotlight component if set spotlightClicks true then trigger target element click event