title: actionEventListener ("click") does not work after inserting another item
body: <p>I'm trying to add dynamically div elements inside <code>filtersSpace</code> div element and at the same time add an eventListener for each button inside the div elements but when I insert the second element the first one to be added does not work.</p>
  
  <p>Can anybody help me ?</p>
  
  <pre><code>case "status":
          filtersSpace.innerHTML +=
              `&lt;div class="card border-dark mx-2 my-3" style="width: 23%;"&gt;
                  &lt;h5 class="card-header"&gt;Status&lt;/h5&gt;
                  &lt;div class="card-body"&gt;
                      &lt;tr&gt;
                          &lt;select class="custom-select mr-sm-2" id="${'statusInput' + statusFilterCounter.toString(10)}"&gt;
                              &lt;option selected value="Solved"&gt;Solved&lt;/option&gt;
                              &lt;option value="Open"&gt;Open&lt;/option&gt;
                              &lt;option value="Pending"&gt;Pending&lt;/option&gt;
                          &lt;/select&gt;
                      &lt;/tr&gt;
                      &lt;tr&gt;
                          &lt;button type="button" class="btn btn-dark my-2" style="width: 100%;"
                          id="${'statusActionButton' + statusFilterCounter.toString(10)}"&gt;
                              Filter
                          &lt;/button&gt;
                          &lt;button type="button" class="btn btn-outline-dark my-2" style="width: 100%;"
                          id="${'statusCancelButton' + statusFilterCounter.toString(10)}"&gt;
                              Cancel
                          &lt;/button&gt;
                      &lt;/tr&gt;
                  &lt;/div&gt;
              &lt;/div&gt;`;
          defineFilter(
              "status",
              document.getElementById("statusInput" + statusFilterCounter.toString(10)),
              document.getElementById("statusActionButton" + statusFilterCounter.toString(10)),
              document.getElementById("statusCancelButton" + statusFilterCounter.toString(10))
          );
          statusFilterCounter += 1;
          statusLink.disabled = true;
          break;
  </code></pre>
  
  <p>...</p>
  
  <pre><code>function defineFilter(filterType, input, actionButton, cancelButton) {
  actionButton.addEventListener("click",
      function () {
          filters.push({filterType : filterType, value : input.value});
          actionButton.disabled = true;
          print();
          getDataFromJSon();
      }
  );
  cancelButton.addEventListener("click",
      function () {
          var quantity = this.id.charAt(this.id.length - 1);
          var counter = 0;
          for (var i = 0; i &lt; filters.length; i++){
              if(filters[i].filterType == filterType){
                  console.log("&gt;&gt;&gt;");
                  if(counter == quantity){
                      filters.splice(i, 1);
                      print();
                      getDataFromJSon();
                      break;
                  }
                  counter += 1;
              }
          }
          actionButton.disabled = false;
      }
  );}
  </code></pre>