You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
By default, the toast is not selectable and you can click through (which is the desired effect in most cases).
However, when there are buttons or any other clickable element underneath the toast, a user click can lead to unwanted events being fired.
Proposed solution
In SvelteToast.svelte, add a new CSS variable allowing to control pointer-events property, keeping current behavior as default.
<style>
._toastContainer {/* rest of the props... *//* pointer-events: none; */pointer-events: var(--toastContainerPointerEvents, none);}
</style>
pointer-events: auto; will avoid this "ghost effect".
Plus, it will allow to select the text within the toast with the mouse (which can be useful for copy/pasting!)
The text was updated successfully, but these errors were encountered:
Explanation
By default, the toast is not selectable and you can click through (which is the desired effect in most cases).
However, when there are buttons or any other clickable element underneath the toast, a user click can lead to unwanted events being fired.
Proposed solution
In SvelteToast.svelte, add a new CSS variable allowing to control
pointer-events
property, keeping current behavior as default.pointer-events: auto;
will avoid this "ghost effect".Plus, it will allow to select the text within the toast with the mouse (which can be useful for copy/pasting!)
The text was updated successfully, but these errors were encountered: