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

    loud-action-20310

    08/19/2022, 9:18 PM
    but it still scrolls to the top of #more after swap
  • l

    loud-action-20310

    08/19/2022, 9:18 PM
    ok will do
  • m

    mysterious-toddler-20573

    08/19/2022, 9:19 PM
    ah, it's an hx boost
  • m

    mysterious-toddler-20573

    08/19/2022, 9:19 PM
    sorry, missed that
  • m

    mysterious-toddler-20573

    08/19/2022, 9:19 PM
    can you make that not a boost? iirc, boost automatically scrolls
  • m

    mysterious-toddler-20573

    08/19/2022, 9:19 PM
    to mimic "normal" links
  • m

    mysterious-toddler-20573

    08/19/2022, 9:19 PM
    (typically a boost would target the entire page, since you want a link to act like a normal link)
  • m

    mysterious-toddler-20573

    08/19/2022, 9:20 PM
    you can still have an href fallback w/ and hx-get
  • m

    mysterious-toddler-20573

    08/19/2022, 9:20 PM
    I think it's the boost that's doing the scrolling though
  • l

    loud-action-20310

    08/19/2022, 9:25 PM
    doh I see. just deployed it here btw https://eppa.royalpickleball.com/posts/
  • l

    loud-action-20310

    08/19/2022, 9:25 PM
    I had weird scrolling issues (inconsistent) in another project this week and was using boost there too
  • l

    loud-action-20310

    08/19/2022, 9:26 PM
    could it be perhaps disabled on boost?
  • m

    mysterious-toddler-20573

    08/19/2022, 9:26 PM
    at that point you'd probably be better off just not boostin and switching to hx-get
  • l

    loud-action-20310

    08/19/2022, 9:26 PM
    boosting is awesome to enhance the pagination links and there can be many
  • m

    mysterious-toddler-20573

    08/19/2022, 9:26 PM
    but you can use a custom hx-swap w/ boosting if you wantt os tay that way
  • m

    mysterious-toddler-20573

    08/19/2022, 9:27 PM
    one sec, lemme look at the code
  • m

    mysterious-toddler-20573

    08/19/2022, 9:28 PM
    try
    hx-swap="innerHTML show:none"
  • m

    mysterious-toddler-20573

    08/19/2022, 9:28 PM
    hell yea pickleball btw
  • l

    loud-action-20310

    08/19/2022, 9:30 PM
    without boost works as expected
  • m

    mysterious-toddler-20573

    08/19/2022, 9:31 PM
    https://github.com/Renerick/htmx/blob/1aafebb0dae2b645c9a03469b1d2e1a71c1f5200/src/htmx.js#L2294
  • m

    mysterious-toddler-20573

    08/19/2022, 9:31 PM
    this is what's causing that behavior
  • m

    mysterious-toddler-20573

    08/19/2022, 9:31 PM
    😑
  • m

    mysterious-toddler-20573

    08/19/2022, 9:31 PM
    if you use a custom swap w/
    hx-boost
    it should work
  • m

    mysterious-toddler-20573

    08/19/2022, 9:31 PM
    or you can not use hx-boost for this one link, probably simpler
  • l

    loud-action-20310

    08/19/2022, 9:33 PM
    cool.
    outerHTML show:none
    works with boost
  • l

    loud-action-20310

    08/19/2022, 9:33 PM
    I tried
    outerHTML scroll:none
    and that still scrolled
  • m

    mysterious-toddler-20573

    08/19/2022, 9:34 PM
    yeah,
    show
    will show something,
    scroll
    will scroll it (e.g. if it has scroll bars)
  • m

    mysterious-toddler-20573

    08/19/2022, 9:35 PM
    kinda annoying distinction
  • l

    loud-action-20310

    08/19/2022, 9:35 PM
    nice
  • l

    loud-action-20310

    08/19/2022, 9:36 PM
    hs + htmx is awesome combo btw. already using it in 4 projects I guess
1...785786787...1146Latest