Closed Bug 1554965 Opened 5 years ago Closed 4 years ago

<input type="date"> input event should be composed


(Core :: DOM: Core & HTML, defect, P3)

67 Branch



Tracking Status
firefox72 --- fixed


(Reporter: web, Assigned: edgar)


(Blocks 1 open bug)



(1 file)

Please see this glitch:!/clever-macaw?path=index.html:67:14

Select a date from the 'inner' input. The resulting input event's composed property should be true, instead it is false.

EXPECTED : <input type="date"> input events should be composed
ACTUAL: those events have composed: false

Source for linked glitch is shown below:

<!DOCTYPE html>
<html lang="en">
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- import the webpage's stylesheet -->
    <link rel="stylesheet" href="/style.css">
    <!-- import the webpage's javascript file -->
    <script type="module">
      import { LitElement, html } from '';

       * Print a debug message to the screen which says
       * - which element the listener was called on
       * - if the event is composed,
      window.print = name => (event) => {
        console.log(name, event);
        const dt = document.createElement('dt');
              dt.textContent = name;
        const dd = document.createElement('dd');
              dd.textContent = `Composed? ${event.composed}`;
        document.querySelector('output dl').appendChild(dt);
        document.querySelector('output dl').appendChild(dd);

       * Define an element with a date input in it's shadow root
      customElements.define('buggy-input', class extends LitElement {
        render() {
          return html`
              Inner Input
              <input id="inner" type="date" @input="${print('inner')}"></input>
       * listen for input events on a control input and the custom el (composed)
      document.getElementById('light').addEventListener('input', print('light'))
      document.querySelector('buggy-input').addEventListener('input', print('outer'))
    <h1>Hi there!</h1>
      Light Input
      <input id="light" type="date" oninput="print('light')"/>

Component: General → DOM: Core & HTML
Product: Firefox → Core
Blocks: shadowdom
Priority: -- → P3
Assignee: nobody → echen
Ever confirmed: true

I'm interested in trying to write a patch for this. It looks to me like is a relevant line. I couldn't find the place where the input event specifically is fired, though.

Some background: in my day job I build node and web. I've contributed to a C codebase before, but have no experience with cpp. This would be my first browser contribution and my first mozilla contribution. I've installed arc and moz-phab, and completed

If you're amenable to acting as my mentor through this process, I'd love that. Alternately, if you're already most of the way through the patch I'd love to see the changes for my own edification.

Thank you!

Flags: needinfo?(echen)

(sorry for the slow response)

I don't have a patch at this moment, free feel to take this bug if you are still interested in working on this bug, I am happy to act as a mentor.
The input event is fired from with EditorInputType::eUnknown and the composed flag of the event isn't set in

Flags: needinfo?(echen) → needinfo?(web)
Flags: needinfo?(web)
Pushed by
Input event should be composed; r=smaug
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla72
You need to log in before you can comment on or make changes to this bug.