Closed hirasso closed 1 year ago
Alternative wordings to make it clearer that this is a one-off variable that will be reset after each visit:
ignoreNextPageVisit
ignoreCurrentPageVisit
@daun, how would you implement this? There was some discussion about not using a flag and instead a callback as a plugin option. Would you like to take care of that? From the Fragment Plugin, we could then overwrite that option on-the-fly, and reset it after a fragment visit.
I'd love to take a stab at passing along a context object for each visit that hook handlers can see and modify. Having a scroll
flag on there would solve this beautifully. It'd have to wait until v4, though. If it can't wait, we could solve it via flag for now and forget all about in v4 🤠
😄 Let's wait then. I hope that v4 is not too far away. Introducing a new option just to deprecate it again after 4 weeks sounds a bit too agile to me 🫢
Related: #47
Description
For the new Fragment Plugin, we need a way to tell the Scroll Plugin to do nothing for the current page visit:
Doing this would also help with #47 I suppose:
~A bit verbose but the most flexible I could come up with to be able to use if from another plugin.~
Added an attribute check for
clickLink
. Now it's possible to ignore the current page visit using the attributedata-swup-preserve-scroll
: