-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Is it ok for appearance:base
<select>
not to require user activation before showPicker()
?
#10604
Comments
What happens if appearance changes while the picker's open? |
That’s something that came up in discussion last week. To avoid possible oscillation or hysteresis, if the |
This would also require |
That'll be required anyway, for |
No, that doesn't require it to be done synchronously as far as I can tell. |
Can you elaborate? It seems like the picker should be opened synchronously or nearly-sync, right? I.e.
|
You could make reading style block as well in theory, no? But taking a step back I don't really like the idea that CSS can be used to toggle API behavior in such a fundamental way. That seems like a pretty severe layering violation. |
Help me understand this comment a bit better, please. This is essentially exactly what |
That's about rendering, not behavior. |
Do we expect that appearance:base-select selects might be still useable in UAs which don't support it (fall back to the old style select)? If so, having different model for showPicker() would be a breaking change. |
It'll be really unfortunate if the whole point of the new customizable- Also, I'm not sure it's a "breaking" change, since the site has to opt itself in by adding |
Not allowing the popover picker to be programatically opened is going to make it harder to test and I imagine that sites would want to do this. Back when the proposal allowed the author to provide their own Since WPTs don't allow user activation in reftests, I'm going to have to work around this limitation to write tests by setting display:block on the popover, which hopefully works. |
You cannot use testdriver with reftests? That seems like something that ought to be fixed if true. |
Not at the moment, see web-platform-tests/wpt#13183. I agree we should get it fixed, and I believe work is progressing. So we discussed the use cases for this capability today at OpenUI. Two concrete use cases were brought up by developers:
Neither of these use cases would be possible to build without |
My perspective is that:
Given this, we should figure out what the best API for accomplishing these use cases are. In my opinion, |
What is the issue with the HTML Standard?
As we're working on the new
appearance:base-select
mode for<select>
, we came across a question. The "old" (appearance:auto/none
) select requires user activation before calls toshowPicker()
, mostly (I believe) for security reasons. Since the native picker can extend beyond the bounds of the viewport, it'd dangerous to allow it to be invoked directly by JS. However, inappearance:base-select
mode, the picker is always just a popover, which can't extend beyond the viewport bounds. So it would seem that showing the<select>
picker is no more dangerous than allowingpopover.showPopover()
, since they're essentially the same thing. So our plan was to remove that restriction when the select's::picker(select)
is set toappearance:base-select
. But we wanted to see if there were any other reasons not to allow that?The text was updated successfully, but these errors were encountered: