-
Notifications
You must be signed in to change notification settings - Fork 216
Open
Labels
agenda+Use this label if you'd like the topic to be added to the meeting agendaUse this label if you'd like the topic to be added to the meeting agendamenuMenu elements proposalMenu elements proposal
Description
We discussed firing a checked or change event on checkable menu items that have their state changed due to activation. So from this, there are two questions:
- What event should fire at the
menuitemelement? Should it bechangeorchecked? It was noted somewhere thatchangefeels a little weird for a non-form-control element. But at the same time it's familiar, and can already be used on form control elements that are not form associated, so I'm not sure how much we should led form-ness inform our decisino. I think I slightly lean towardschange, but am open to introducing a newcheckedevent if people feel strongly. - How should firing this event interact with the
clickevent that we decided in [menu] Should an event be fired when a <menuitem> is selected? Which event? #1312 should be fired when a menu item is activated?- Right now for
appearance: autoselect, when a new entry is selected, first achangeevent is fired at the<select>. Then, a syntheticclickevent (for example, if you hitEnteron the new option) is fired at the<select>. This seems to be consistent with what http://html.spec.whatwg.org/C#activation expects. I'm using https://jsbin.com/lexipis/edit?html,output to test. - For
appearance: base-select, when a new entry is selected, first achangeevent is fired at the<select>. Then, a realclickevent is fired at the selected<option>only if you actually click it! If you poundEnteron it, you only get achangeat the<select>, and never see aclick. - For menu elements, I think this leaves us with firing a
change(orchecked, if we decide) event at the menu item element that was selected, and then immediately after, a syntheticclickalso at the same menu item, per the outcome of [menu] Should an event be fired when a <menuitem> is selected? Which event? #1312, since we will have activated the menu item. Alternatively, we could fire thechange/checkedevent, and then omit theclicksince we hadchange/checkedhandlers. I think this would be novel though.
- Right now for
The first part of this issue is mostly event name bikeshedding. Does everyone agree with the second part of the proposal: firing two events back to back for this case? Are there any concerns with doing that? I vaguely recall @mfreed7 registering some worry about this.
Metadata
Metadata
Assignees
Labels
agenda+Use this label if you'd like the topic to be added to the meeting agendaUse this label if you'd like the topic to be added to the meeting agendamenuMenu elements proposalMenu elements proposal