-
-
Notifications
You must be signed in to change notification settings - Fork 637
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
EditableViewer cannot be clicked on mobile #720
Comments
@alexconstantin |
moveable's new version is released. Check it again. |
@daybrush Thank you! The button is now clickable again on mobile. However I found another scenario. Please check this link: https://codesandbox.io/s/gracious-wu-0ri1kz?file=/src/App.tsx On the top of the page there is a button. Clicking it will alert the value "1". I've changed a bit the functionality for the +/ - buttons so that they will trigger a click event (using jQuery) on that button. However, nothing happens, both on desktop and mobile. Is the propagation of the click event stopped somehow? Is there a way to trigger click events in this scenario? |
In Moveable, stopPropagationd is applied to the click event. And click event in react is SyntheticEvent. The following method is recommended. const onButtonClick = () => {
console.log(jQuery("#test"));
requestAnimationFrame(() => {
jQuery("#test").trigger("click");
});
}; |
@daybrush Thank you! It works now. |
Environments
https://codesandbox.io/s/9ogvkk?file=/src/App.tsx:1044-1058
https://9ogvkk.csb.app/ (can be reproduced by opening this with Chrome device simulation)
Description
Clicking the + / - buttons works on desktop, but on mobile it has no effect.
This functionality was working in previous versions of Moveable.
The text was updated successfully, but these errors were encountered: