worker-dom icon indicating copy to clipboard operation
worker-dom copied to clipboard

HTMLInputElement.select() not working

Open joakimkm opened this issue 5 years ago • 0 comments

web_compat_table.md says that select() is working, but that seems to be incorrect.

This is working:

var inputTextEl = document.getElementById("inputID");

inputTextEl.addEventListener('click', function myFunction(event) { 
    event.target.value = "value changed";
});

This is not working:

var inputTextEl = document.getElementById("inputID");

inputTextEl.addEventListener('click', function myFunction(event) { 
    event.target.select();
});

Console says: Uncaught TypeError: event.target.select is not a function Would been nice with a working select function.

joakimkm avatar Jan 27 '20 23:01 joakimkm