I want to enable an input field when clicking on it - which works perfectly fine in chrome for example - code is super simple and works just fine in chrome. I can click anywhere in the yellow area to make this work. but in firefox, only the blue area triggers the function. What did I miss?
image:
let numInput = document.createElement("input");
let input_col = document.createElement("div");
numInput.disabled = true;
numInput.id = "numberInput";
input_col.addEventListener('click', function() {
$("#numberInput").removeAttr("disabled");
// or: numInputField.removeAttribute("disabled");
});
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<div class="col-sm-2">
<label class="col-sm-3 col-form-label" for="colFormLabelSm">
number
</label>
</div>
<div class="col-sm-2">
<input class="form-control form-control-sm" type="text" data-key="number" disabled="" id="numberInput">
</div>
<div class="col-sm-8" id="numberInputText">
click to edit!
</div>