htmx icon indicating copy to clipboard operation
htmx copied to clipboard

fix sse-swap removal handling in ext/sse.js

Open Renerick opened this issue 1 year ago • 0 comments

Description

sse.js was not returning from handler after removing event listeners when sse-swap element was replaced/removed from the DOM. This lead to errors when removed element was target for swapping

Corresponding issue: https://discord.com/channels/725789699527933952/1200403330254520320

Testing

I added new test case to test/ext/sse.js and also ran manual tests with the test server

Checklist

  • [x] I have read the contribution guidelines
  • [x] I have targeted this PR against the correct branch (master for website changes, dev for source changes)
  • [x] This is either a bugfix, a documentation update, or a new feature that has been explicitly approved via an issue
  • [x] I ran the test suite locally (npm run test) and verified that it succeeded

Renerick avatar Jan 26 '24 16:01 Renerick