Closed alexconstantin closed 2 years ago
@alexconstantin I'll fix it soon.
@alexconstantin
lit-moveable
0.12.1moveable
0.35.1preact-moveable
0.37.1react-compat-moveable
0.23.1react-moveable
0.38.1svelte-moveable
0.27.1vue-moveable
2.0.0-beta.33vue3-moveable
0.10.1ngx-moveable
0.32.1moveable'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?
@alexconstantin
In Moveable, stopPropagationd is applied to the click event.
And click event in react is SyntheticEvent. A problem may occur due to the difference in the order of react events and native events.
The following method is recommended.
const onButtonClick = () => {
console.log(jQuery("#test"));
requestAnimationFrame(() => {
jQuery("#test").trigger("click");
});
};
@daybrush Thank you! It works now.
Environments
Description
Clicking the + / - buttons works on desktop, but on mobile it has no effect. This functionality was working in previous versions of Moveable.