Javascript Vanilla - Double Click event handler on inputs / GetEelemntsByTagName : **Problem:** Can't assign a double click event handler to my generated inputs; is this feasable using the getEelementsByTagName?

Thanks for any help

Here is the code:

**Generated inputs**

    function list_tasks() {
        let container = document.getElementById("todo");
        container.innerHTML = ""
    
        if (task_array.length > 0) {
            for (let i = 0; i < task_array.length; i++) {
                let input = document.createElement("input");
                input.value = task_array[i];
                input.classList.add("record");
                input.disabled = true;
                container.appendChild(input);
            }
        }
    }

**Attaching the event**

    document.getElementsByClassName("record").addEventListener("dblclick", editTask);

**And the console.log is never called**

    function editTask(e){
       console.log("double click")
    }
