https://htmx.org logo
Join Discord
Powered by
# htmx-general
  • h

    hundreds-camera-24900

    09/13/2022, 6:25 PM
    yeah that's what I would expect too
  • h

    hundreds-camera-24900

    09/13/2022, 6:25 PM
    let me make a quick test and see if I can repeat
  • h

    hundreds-camera-24900

    09/13/2022, 6:29 PM
    hmm no good way to test it on the demo is there
  • h

    hundreds-camera-24900

    09/13/2022, 6:45 PM
    I am able to replicate it 😦
  • h

    hundreds-camera-24900

    09/13/2022, 6:45 PM
    https://github.com/gone/oobtest/blob/main/app.py
  • h

    hundreds-camera-24900

    09/13/2022, 6:45 PM
    I'll open a bug on gh, I have some free time so I can poke at this tonight
  • m

    magnificent-boots-1658

    09/13/2022, 6:46 PM
    Howdy gang! Is there a quick and dirty way to "pause" HTMX's various polling? Like if I wanted to debug some CSS on some elements that are being refreshed on a poll type
    hx-get
    ?
  • h

    hundreds-camera-24900

    09/13/2022, 6:46 PM
    I think I unfortunately have a similar error w/ oob I found around boosted responses and empty oob responses
  • h

    hundreds-camera-24900

    09/13/2022, 6:47 PM
    but I'll start there and try to fix because if I can fix that error I don't need to fix the other
  • h

    hundreds-camera-24900

    09/13/2022, 6:52 PM
    Master is ahead of dev - is that on purpose?
  • m

    mysterious-toddler-20573

    09/13/2022, 7:00 PM
    you can include a filter on the poll expression and set that to a global that you turn on and off
  • m

    mysterious-toddler-20573

    09/13/2022, 7:00 PM
    probably website stuff
  • m

    mysterious-toddler-20573

    09/13/2022, 7:00 PM
    you can merge it back
  • h

    hundreds-camera-24900

    09/13/2022, 7:04 PM
    k
  • h

    hundreds-camera-24900

    09/13/2022, 7:04 PM
    So it looks like this is semi-indented behavior for a normal swap that doesn't work for an oob
  • m

    magnificent-boots-1658

    09/13/2022, 7:06 PM
    That works well enough for now! Might be nice to have some debug control on those kinds of things, but I'm not sure what the interface would look like.
  • h

    hundreds-camera-24900

    09/13/2022, 7:06 PM
    oob calls swap with the fragment with the oob attribute (li in this case) https://github.com/bigskysoftware/htmx/blob/master/src/htmx.js#L729 which calls swapBeforeEnd https://github.com/bigskysoftware/htmx/blob/master/src/htmx.js#L932 which calls insert nodes before (https://github.com/bigskysoftware/htmx/blob/master/src/htmx.js#L882) which explicitly pulls out the contents of the fragment https://github.com/bigskysoftware/htmx/blob/master/src/htmx.js#L814-L819
  • h

    hundreds-camera-24900

    09/13/2022, 7:07 PM
    What's the right behavior? A special case in the oob function to check the swap method and wrap in a span if it's beforeEnd?
  • m

    mysterious-toddler-20573

    09/13/2022, 7:58 PM
    @hundreds-camera-24900 can I get back to you tonight, my brain is on full boil right now
  • h

    hundreds-camera-24900

    09/13/2022, 8:18 PM
    ya
  • m

    mysterious-toddler-20573

    09/14/2022, 1:08 PM
    OK, this looks like a bug for sure
  • m

    mysterious-toddler-20573

    09/14/2022, 1:08 PM
    but it is also a bug I am afraid to change
  • m

    mysterious-toddler-20573

    09/14/2022, 1:08 PM
    @hundreds-camera-24900
  • m

    mysterious-toddler-20573

    09/14/2022, 1:09 PM
    I will need to spend some time thinking about it
  • m

    mysterious-toddler-20573

    09/14/2022, 1:09 PM
    unfortunately
  • m

    mysterious-toddler-20573

    09/14/2022, 1:23 PM
    https://github.com/bigskysoftware/htmx/blob/1aafebb0dae2b645c9a03469b1d2e1a71c1f5200/src/htmx.js#L720
    h
    • 2
    • 31
  • m

    mysterious-toddler-20573

    09/14/2022, 1:23 PM
    I think this is the culprit
  • m

    mysterious-toddler-20573

    09/14/2022, 1:24 PM
    this should be updated to be if
    isInnerHTMLSwap()
  • m

    mysterious-toddler-20573

    09/14/2022, 1:24 PM
    because in that case we use the oob element as a "carrier" for arbitrary inner HTML
  • m

    mysterious-toddler-20573

    09/14/2022, 1:24 PM
    welll
1...825826827...1146Latest