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

    late-king-98305

    07/23/2022, 1:10 PM
    Do you happen to have
    scroll-behavior: smooth
    in your site's CSS?
  • m

    mysterious-toddler-20573

    07/23/2022, 1:54 PM
    There is the
    htmx.config.scrollBehavior
    setting that you can change to
    auto
  • b

    broad-pencil-64390

    07/23/2022, 1:58 PM
    Unfortunately this doesn't seem to be it (no such css), but thanks for the tip
  • b

    broad-pencil-64390

    07/23/2022, 2:30 PM
    @mysterious-toddler-20573 Thanks that worked!
  • d

    damp-arm-31929

    07/23/2022, 3:37 PM
    @salmon-whale-14625 FYI your site htmldriven.dev appears offline again. :( (The reason why I keep tabs on it is because I'm giving a talk at this year's CraftCMS DotAll conference about "HTML over the wire", and your site is an invaluable resource!)
  • h

    hundreds-camera-24900

    07/24/2022, 2:55 PM
    So most of the time in the past I've had a button to trigger forms, and an a tag styled to look like a button
  • h

    hundreds-camera-24900

    07/24/2022, 2:55 PM
    that's part of the general look and feel of a site
  • h

    hundreds-camera-24900

    07/24/2022, 2:55 PM
    I'd like to just use one from now on - either hx-get on a button or hx-post on the link
  • h

    hundreds-camera-24900

    07/24/2022, 2:55 PM
    and I"m trying to decide which is better from a ux pov
  • h

    hundreds-camera-24900

    07/24/2022, 2:56 PM
    Right now I think using a link everywhere is better since that will allow middle click to work when it's a normal link styled to look like a button
  • h

    hundreds-camera-24900

    07/24/2022, 2:57 PM
    are there any downsides for a form submission? I can't see one
  • g

    gorgeous-airport-54386

    07/24/2022, 2:57 PM
    why?
  • h

    hundreds-camera-24900

    07/24/2022, 2:58 PM
    less components to worry about
  • h

    hundreds-camera-24900

    07/24/2022, 2:58 PM
    I don't have to grapple with "is this a button-button or a button-link"
  • h

    hundreds-camera-24900

    07/24/2022, 2:58 PM
    it's just a button
  • g

    gorgeous-airport-54386

    07/24/2022, 2:59 PM
    a link to submit a form is a no-no
  • g

    gorgeous-airport-54386

    07/24/2022, 2:59 PM
    you know how in http semantics, GET has no side effects?
  • h

    hundreds-camera-24900

    07/24/2022, 2:59 PM
    sure
  • g

    gorgeous-airport-54386

    07/24/2022, 2:59 PM
    for human users, is the same
  • h

    hundreds-camera-24900

    07/24/2022, 3:00 PM
    not following your point on that
  • m

    mysterious-toddler-20573

    07/24/2022, 3:00 PM
    * unless styled like a button
  • g

    gorgeous-airport-54386

    07/24/2022, 3:00 PM
    you could have one component that changes its tag, no?
  • h

    hundreds-camera-24900

    07/24/2022, 3:00 PM
    I could
  • h

    hundreds-camera-24900

    07/24/2022, 3:00 PM
    that wouldn't be terrible but I don't see why
  • h

    hundreds-camera-24900

    07/24/2022, 3:01 PM
    using a link like a button would be like
    <a hx-post="closest form">
  • m

    mysterious-toddler-20573

    07/24/2022, 3:01 PM
    HTML: making it impossible to do things right easily since
  • m

    mysterious-toddler-20573

    07/24/2022, 3:01 PM
    lol, buttons, anchors
  • h

    hundreds-camera-24900

    07/24/2022, 3:01 PM
    afik that doesn't run the risk of the borwser doing something stupid like preloading the submit, since there's no href to preload
  • m

    mysterious-toddler-20573

    07/24/2022, 3:01 PM
    not using divs for everything
  • b

    broad-pencil-64390

    07/24/2022, 3:02 PM
    Depending on what type of form it is CSRF-mitigation can be a good point to keep using POST
1...759760761...1146Latest