I have a <select>
that would like to respond to a click
event (using javascript).
On MacOS Chrome, no event is fired on click. This is a known problem (e.g. 1, 2, …)
<select id='hodor'>
<option>Jon Snow</option>
<option>Joffrey</option>
</select>
and
$('#hodor').on('click change', function (e) {
$(this).after("<li>"+e.type+"</li>");
});
I already know that I can use the change
event (which I already do use). However the behavior is different for the end user and I need to make it work accurately: as soon as my select is clicked, I would like my UI to do something — not only when the selected option is changed.
What are my alternatives?
Kindly note: this is not a duplicate of other questions which allow for a "use the change
event" answers. That's not what I am asking.