Onselect is not being triggered on a tag with an contenteditable attribute

Try yourself:

A proof that it works on a input tag:

Am I doing something incorrectly?

Apparently in HTML5 the select event only works with input and textarea elements.
see: https://www.w3.org/TR/DOM-Level-3-Events/#event-type-select

1 Like

World Wide Web Consortium says

The select event might not be available for all elements in all languages. For example, in HTML5, select events can be dispatched only on form input and textarea elements. Implementations can dispatch select events in any context deemed appropriate, including text selections outside of form controls, or image or markup selections such as in SVG.