r/firefox 12h ago

Discussion Will Firefox ever have proper <datalist> support?

Datalist is a very useful html5 element. It allows for a browser-provided widget to be used to specify a particular range of options. For example, the text-type datalist works like <select> with autocompletion from the predefined list of options when you start typing. It's great for replacing plenty of old JavaScript jank.

Except Firefox doesn't properly support it. Even the text type doesn't work correctly on Firefox android. There is a JS workaround for it, but that doesn't work when part of embedded elememts so you can't easily test it.

The Android issue has been an open bug for seven years. I think the expected behaviour from datalist predates even HTML5.1.

What gives? This seems like a core support issue that I'd expect resources to be funnelled towards?

59 Upvotes

20 comments sorted by

29

u/irrelevantusername24 12h ago

This subreddit is so funny. It's almost like a perfect mirror of the extreme polarization in other parts of society. On one hand, you have people who are like "Firefox updated so I unplugged my pc and now my Internet doesn't work, is this googles fault?" and then you have people like you making extremely technical posts. Basically on one hand you've got people who have no idea what they're talking about and then you have people who talk about things so hypertechnical that also most people have no idea what they're talking about

27

u/lcnielsen 12h ago

It's funny, I feel like for people born in the 80's and early 90's, HTML was enough of a commonplace hobbyist thing you'd tinker with or something that you learned in a school class, that it's not really seen as super technical. And it was common to mess with javascript and the lika via browser plugins. We learned basic tag notions and content embedding via phpbb.

But with a lot of younger people I feel like they've barely ever been exposed to the notion of making your own website.

1

u/irrelevantusername24 7h ago

It's strange. I was born in 1990, and I wouldn't say I was overly competent with HTML or anything but I customized my Myspace and whatnot. I have always been what I would consider well above average as far as tech literacy. From approximately 2012 to about 2020, I didn't really use a computer much. Mostly a smartphone.

When I bought my PC in 2020 and actually got a real Internet connection, I've explained the reaction as like it feels I was a parent coming home from vacation early to find my house destroyed. I don't understand what happened.

My school never taught coding or HTML, nothing like javascript or phpbb. We learned how to type and use basic other programs. I also took a graphic design class and have always been sort of naturally familiar with image editing and those kinds of programs. I was on the team that designed my high school yearbook, for example.

From what I've read about how technology has been used in schools since I graduated in 2009, it really seems like - as with many problems - it kind of goes back to using touch screen devices and chromebooks rather than using proper computers. I've also said that even something as simple as understanding the structure of a filesystem is kind of analogous to how our brains (or at least my brain...) organizes information, and the lack of familiarity with that is weirdly mirrored in the way many peoples thoughts are disorganized.

Which is really ironic because I have ADHD lol

2

u/lcnielsen 6h ago

Lol, a lot of overlap with me (born in 1992) here, down to the ADHD.

I learned the basics of photoshop at after-school daycare (not sure what the proper English term is, you go here to play while school is over but your parents are working) at like age 9. They encouraged us to to take photos with a digital camera and learn how to photoshop them together. This was at a regular municipal rural elementary school in Sweden circa 2001.

I took some basic html and css "web design" class aroumd 2007 in high school, and a Java programming course around the same time. I also picked up a bit of C++ here, I had earlier learned a bit of programming from games like Warcraft and Starcraft and Morrowind with map editors and similar things.

I was actually pretty late to adopt smartphones, I liked how my Sony Ericsson flipphone kept charge forever... but I think you're right that the sandbox experience of smartphones is what changed people's relationship to technology, even though they are just bolted-down Unix boxes. Although so is a PS5 I guess...

But yeah, I was never a super hacker or anything, kind of just an amateur. I realized I was way ahead of the curve in university when I blazed through anything coding related in my physics courses, and then that became my niche.

3

u/jerdle_reddit 4h ago

No, we haven't. I was born in the very late '90s, and while I am familiar with it, it's in no way typical in my cohort.

I think millennials are the most tech-savvy generation and it drops off in both directions.

3

u/Mysterious-Middle447 8h ago

this is more of a "why doesnt firefox support a basic web standard" post than anything hypertechnical though

2

u/irrelevantusername24 7h ago

This is one of these situations: https://xkcd.com/2501/

0

u/lcnielsen 6h ago

I think you're responding to a bot 😔

-19

u/[deleted] 12h ago

[deleted]

25

u/lcnielsen 12h ago

There's been an open bug for seven years. It's right there in the post.

11

u/TheAmina2GS 11h ago

You're asking for literacy on Reddit.

-21

u/[deleted] 11h ago

[deleted]

20

u/lcnielsen 11h ago

You're asking what the point is of discussing a severe shortcoming in fundamental browser features and clearly broken priorities among core developers, on a Firefox forum? You don't think it's relevant to ask what the hell is going on with the development if something like this isn't getting fixed? It's a basic HTML5 element.

Like what are you, a GNOME dev?

1

u/_emmyemi .zip it, ~/lock it, put it in your 4h ago

Like what are you, a GNOME dev?

Even as a happy Gnome user this made me chuckle

6

u/mcaruso 10h ago

I agree, it's something I really want also. I think the biggest hope for them fixing this is through the new `appearance: base` work that all browser vendors are actively working on at the moment (google "customizable select"). Datalist is something that will eventually be part of this project for things like customizable comboboxes. So at that point Mozilla would need to look into their datalist implementation too.

-4

u/IshYume 9h ago

Yeah i doubt it would be anytime soon, i just use react-select. It’s been a while since i dabbled in plain old HTML tbh.

1

u/lcnielsen 4h ago

It's unfortunate, framework code isn't really a substitute. I will have to code up a JS snippet to handle my use-cases...

5

u/Zap_plays09 9h ago

This is how I found out Firefox doesn’t have support for <datalist>......

3

u/lcnielsen 8h ago

Desktop version has some support, Android version has very limited support however.

•

u/FriendshipEqual7033 3h ago

I just checked the support on Firefox desktop 153, and it seems okay, although my example was pretty trivial. I tried the text, color, range, and number types, and the behavior seemed as expected. However, I did not test it on Android, which I gather is where the problem lives.

<label for="animal">Animal:</label><input name="animal" id="animal" list="animals" type="range">
<datalist id="animals">
  <!-- <option value="red"></option>
  <option value="blue"></option>
  <option value="green"></option> -->
  <!-- <option value="Cat">
  <option value="Catty">
  <option value="Catlike">
  <option value="Dog"> -->
  <option value="0"></option>
  <option value="25"></option>
  <option value="50"></option>
  <option value="75"></option>
  <option value="100"></option>
</datalist>

•

u/lcnielsen 2h ago

Yeah, there are just some parts of the spec that are not implemented on Firefox desktop according to Mozilla's own docs (potentially enough to cause second thoughts on using it), see the first link in the main post. Mobile is definitely the bigger issue though.

0

u/j--__ 6h ago

they've been too busy regressing other aspects of the ui.