News for hackers. Stuff that matters.
Re:Bringing Back Horizontal Rules in HTML Select Elements by Pesthuf on Saturday January 27, 2024 @09:16AM (#39155712)
<select multiple> on mobile devices is so good - why don't the finally improve the implementations on the desktop as well? The arcane 90s UI paradigm it currently uses everywhere just doesn't work.

And please, just give us an attribute that adds a search bar... I don't want to use 30 KB of JavaScript just to have selects that feel like they're from this millennium, especially since those then don't work too well on mobile…

Re:Bringing Back Horizontal Rules in HTML Select Elements by extra88 on Saturday January 27, 2024 @10:05AM (#39156133)
That's a text input plus a datalist. Their browser implementations also have some issues but can do the job.
Re:Bringing Back Horizontal Rules in HTML Select Elements by moron4hire on Saturday January 27, 2024 @02:50PM (#39159135)
There's a whole other ball of problem wax with input plus datalist. The options don't appear again if one has been selected already; the user first has to clear the input and then the list appears. Also, the input can't be strictly limited to the options in the datalist; the user could type in whatever they want and it's still "valid" and fulfills any required attribute added to the tag.
Re:Bringing Back Horizontal Rules in HTML Select Elements by carlosjobim on Saturday January 27, 2024 @11:01AM (#39156619)
> And please, just give us an attribute that adds a search bar...

That's the datalist html element.

Re:Bringing Back Horizontal Rules in HTML Select Elements by int_19h on Saturday January 27, 2024 @05:14PM (#39160414)
What is "arcane" about the desktop multiple selection paradigm? It has been the standard way to deal with selections in all desktop OSes for decades now.
Re:Bringing Back Horizontal Rules in HTML Select Elements by cxr on Sunday January 28, 2024 @07:21AM (#39164996)
See bdcravens's response: <https://news.ycombinator.com/item?id=39158003>

(Note though that you aren't limited to Ctrl-clicking. There's Shift-clicking, too, as well as mouse lassoing. Assuming your UA supports it, that is.)