EragonJ / Trip.js

🚀 Trip.js is a plugin that can help you customize a tutorial trip easily with more flexibilities.

Home Page:https://eragonj.github.io/Trip.js/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

optionally prevent click propagation out of the trip block

71FIL opened this issue · comments

Some plugins react to clicks outside their boundaries by closing themselves. If that plugin is the object of a sequence of trips, a click in the first trip next button can close it and the following trip has lost the element it wants to show.

I suggest adding an option, stopClickPropagation, both local and global, that would allow to stop click propagation when needed.

yes you are right, there might have this scenario. Because there is no overhead to have this enabled, I think this option can be used by default and only for some special cases to disable that.

@71FIL if you click anywhere inside the trip in the first step (not action buttons), your plugin will still be closed, right ? I think this should be handled in trip-block (the container itself) for any click inside that block.

@EragonJ Absolutely right. This is what I actually implemented: a click handler is added on the trip-block which calls stopPropagation if the option is set (locally or globally).

ok let's do that way ! @71FIL since you already had the fix already, can you send me a PR for this ? thanks !