Login
You're viewing the front-end.social public feed.
  • Mayankmayank
    May 27, 2026, 5:36 PM

    RE: mastodon.social/@jaffathecake/

    i despise `<input type=number>` with a passion. it's utterly broken!

    this is what i use and recommend instead:

    ```
    <input inputmode="numeric" pattern="[0-9]*">
    ```

    (the `inputmode` attribute improves the experience for touchscreen keyboard users, and the `pattern` attribute helps with validation)

    💬 1🔄 1⭐ 7

Replies

  • Mayankmayank
    May 27, 2026, 5:47 PM

    even with the "fix" in Chrome 150, i think the scroll behavior is unacceptable.

    detecting the presence of a `wheel` event listener is such a weird way for opting in/out. not to mention that some frameworks also delegate all events by preemptively listening to every single event for you, no matter whether you need it in your own code.

    💬 0🔄 0⭐ 3