angular-shepherd icon indicating copy to clipboard operation
angular-shepherd copied to clipboard

Disable double clicks?

Open lespuch-v opened this issue 3 years ago • 1 comments

Hi, first of all, I would like to thank you for this great library. As I was working and using this library, I found an issue that I was unable to solve.

I have a situation where I have some animations, and the animation has to finish before the next step appears; otherwise, step will not appear on the screen.

For example, an accordion has to unwrap before I can target a specific item and I managed to solve this by delaying next step with setTimeout, and it works great, but another bug appears, and that is the user can now double-click on the buttons.

So, my question is. Is it possible to disable double-clicks on the buttons? Or maybe solve this issue in another way? Thanks in advance for all you good works!

I prepared this little demo https://stackblitz.com/edit/angular-ivy-2r9rny?file=src/app/app.component.ts maybe it will help to illustrate my issue. Unfortunately stackblitz is not showing styles for some reason

lespuch-v avatar Oct 14 '22 08:10 lespuch-v

@lespuch-v you can use beforeShowPromise or we recently refactored Shepherd itself to take a function for attachTo.element to allow more control over these sorts of situations.

RobbieTheWagner avatar Oct 17 '22 01:10 RobbieTheWagner