Intent to Implement and Ship: Send “input” event on checkbox click.

53 views
Skip to first unread message

shanm...@samsung.com

unread,
Jan 12, 2018, 5:38:00 AM1/12/18
to blink-dev


Contact emails

shanm...@samsung.com

 

Explainer

N/A 

 

Design doc/Spec

https://html.spec.whatwg.org/#checkbox-state-(type=checkbox)

 

Summary / Motivation

As per spec, click on mutable checkbox fires a click event, then an input event, then a change event.

Currently chrome does not fire input event. This proposal changes that it fires input event before change event as per spec for checkbox.

 

Risks

Interoperability and Compatibility

Possibly some sites may start getting “input” event when they don't expect them. Firefox already sends this event, so this event shouldn't really surprise web developers.

 

Edge: No signals

Firefox: Shipped

Safari: No Signal

Web developers: Positive

 

Ergonomics

N/A.

 

Activation

Easy to start taking advantage of just add the listener.

 

Debuggability

Easy

 

Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?

Yes

 

Is this feature fully tested by web-platform-tests?

Yes.

html/semantics/forms/the-input-element/checkbox-click-events.html

html/semantics/forms/the-input-element/checkbox.html

 

OWP launch tracking bug

http://crbug.com/534245

 

Link to entry on the feature dashboard

https://www.chromestatus.com/feature/5768525515849728

 

Requesting approval to ship?

Yes

Philip Jägenstedt

unread,
Jan 16, 2018, 8:39:16 AM1/16/18
to shanm...@samsung.com, nzol...@chromium.org, blink-dev
So, is Gecko the only engine that fires a click event here? Is there some history to this issue, some original reason that the click event isn't fired?

This is a bit similar to Intent to remove: Non-primary button click event+Navid Zolghadr, do you have any thoughts on this one?

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/b5456765-94e4-46a8-9ffc-b4b35781ce1b%40chromium.org.

shanm...@samsung.com

unread,
Jan 16, 2018, 8:49:45 AM1/16/18
to blink-dev, shanm...@samsung.com, nzol...@chromium.org
>> So, is Gecko the only engine that fires a click event here? Is there some history to this issue, some original reason that the click event isn't fired?

Yes. But issue is not with "click" event. Its with "input" event.
Gecko fires "click", "input" and "change" in order.
Chrome and Safari fires only "click" and "change" events.

https://wpt.fyi/html/semantics/forms/the-input-element/checkbox-click-events.html

Dave Tapuska

unread,
Jan 16, 2018, 8:51:00 AM1/16/18
to Philip Jägenstedt, shanm...@samsung.com, Navid Zolghadr, blink-dev
I think this is about the input event. Not the click event. Philip how does it related to the auxclick?

Dave

To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAARdPYciwVWUrFaitoXehZ5BetyfoLOfEa_8rjDOwZr%2BL3tFnw%40mail.gmail.com.

Philip Jägenstedt

unread,
Jan 16, 2018, 9:40:05 AM1/16/18
to Dave Tapuska, kere...@chromium.org, shanm...@samsung.com, Navid Zolghadr, blink-dev
Oops, I was a bit quick with the fuzzy matching there. If it had been about click events, then I'd wonder why those were being suppressed to begin with, since that couldn't be an accident if done in 3 engines.

In manual ad-hoc testing I see that toggling the state of a checkbox with they keyboard also doesn't fire input events in Chrome, but does in Firefox. And the spec is written in terms of "activation behavior", so the two cases should be treated the same.

Shanmuga, would the changes you plan also fix the keyboard case? Tests for that in wpt would also be great, but probably have to be manual. +Jonathon Kereliuk is adding support for keyboard input to testdriver.js soon, so this should soon be possible, however.

LGTM1 assuming the keyboard case is also covered, and tested in whatever way currently actually works. (If you run into untestable cases like this, please file issues on web-platform-tests with the type:untestable label.)

To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.

Daniel Bratell

unread,
Jan 16, 2018, 9:42:22 AM1/16/18
to Dave Tapuska, kere...@chromium.org, Philip Jägenstedt, shanm...@samsung.com, Navid Zolghadr, blink-dev
LGTM2

/Daniel
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAARdPYdRLAi-com_g4ZknOU%3DbvowiWzcXmXNXpCV%2B4UtcL5JkQ%40mail.gmail.com.



--
/* Opera Software, Linköping, Sweden: CET (UTC+1) */

Rick Byers

unread,
Jan 16, 2018, 11:09:50 AM1/16/18
to Daniel Bratell, Dave Tapuska, kere...@chromium.org, Philip Jägenstedt, Shanmuga, Navid Zolghadr, blink-dev
LGTM3

To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.



--
/* Opera Software, Linköping, Sweden: CET (UTC+1) */

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.

shanm...@samsung.com

unread,
Jan 17, 2018, 12:46:26 AM1/17/18
to blink-dev, dtap...@chromium.org, kere...@chromium.org, shanm...@samsung.com, nzol...@chromium.org
>> Shanmuga, would the changes you plan also fix the keyboard case?

Yes. I am planning to add changes for keyboard case as well.
Thanks
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.

shanm...@samsung.com

unread,
Jan 17, 2018, 12:55:49 AM1/17/18
to blink-dev, dtap...@chromium.org, kere...@chromium.org, shanm...@samsung.com, nzol...@chromium.org

 >> (If you run into untestable cases like this, please file issues on web-platform-tests with the type:untestable label.)
Filed issue https://github.com/w3c/web-platform-tests/issues/9062, but unable to add label.
Thanks

Philip Jägenstedt

unread,
Jan 17, 2018, 7:49:36 AM1/17/18
to shanm...@samsung.com, blink-dev, dtap...@chromium.org, kere...@chromium.org, nzol...@chromium.org
On Wed, Jan 17, 2018 at 6:55 AM <shanm...@samsung.com> wrote:

 >> (If you run into untestable cases like this, please file issues on web-platform-tests with the type:untestable label.)
Filed issue https://github.com/w3c/web-platform-tests/issues/9062, but unable to add label.

Thanks! I've added the label and made it such that you can too going forward. 
Reply all
Reply to author
Forward
0 new messages