htmx icon indicating copy to clipboard operation
htmx copied to clipboard

History swap bypasses extension handleSwap

Open wbobeirne opened this issue 3 years ago • 1 comments

I'm using an extension to implement some custom behavior to work around #748, and it works really well for regular link navigation, but unfortunately doesn't work on browser navigation. This is because loadHistoryFromServer and restoreHistory both directly call swapInnerHtml instead of swap, bypassing the extension check. It would be great if those two continued to use the regular swap, or if there was a separate extension hook for handleHistory to avoid breaking any existing extensions.

wbobeirne avatar Jan 03 '22 22:01 wbobeirne

looks like a good change! Can I ask you to add a test for it as well as docs?

1cg avatar Feb 04 '22 18:02 1cg