Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rendering <select> as a listbox is a one-line widget that opens a popup on iOS and Android #8189

Open
zcorpan opened this issue Aug 12, 2022 · 3 comments

Comments

@zcorpan
Copy link
Member

zcorpan commented Aug 12, 2022

See #3410 (comment)

I suppose there's a good reason for this in terms of usability -- it may be hard to select options on a touchscreen without sufficient spacing, and taking up more space for an inline widget might be less web-compatible compared to showing a one-line widget.

On even smaller screens like a watch this approach also makes sense.

HTML doesn't currently allow it in the rendering section, however. What should the spec say? Allow either inline listbox or a one-line widget that opens a popup?

cc @whatwg/forms @mfreed7

@josepharhar
Copy link
Contributor

Yeah it's unfortunate that there is a platform difference like this with the same html, and I'm worried that it's something we won't be able to change. It also poses challenges for making appearance:base work for listbox/multiple selects: https://issues.chromium.org/issues/357649033#comment4

In order to make the spec reflect the current reality, we could add some text saying that the UA may force popup rendering instead of listbox rendering if it chooses.

In order to actually allow developers to have an in-page listbox rendering that is respected across platforms and that we could have appearance:base multi-select for, I wonder if we could add another attribute?

@annevk
Copy link
Member

annevk commented Nov 27, 2024

I think we first need to properly understand how we got here in the first place. Adding new features to fix an existing problem generally does not solve the problem.

cc @pxlcoder @nt1m

@annevk annevk added the topic: select The <select> element label Nov 27, 2024
@josepharhar
Copy link
Contributor

This behavior for chromium and webkit was implmented here:

Before this patch, <select multiple> and <select size=2> were always rendered in-page for all platforms. I'm guessing that there was a desire to add native support for some platforms which had multi-select popups, and it was decided to do it this way, and the platforms which didn't have native support for multi-select popups continued to use the existing in-page listbox.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants