select element not registering event handlers?
bfulop opened this issue · comments
Bálint Fülöp commented
No matter how hard I try, I can only register event handlers for the onmouseover
event with the <select>
element. The other event types disappear once the element is rendered.
var html = require('yo-yo')
var logger = e => console.log(e)
html`
<select id="myselect" oninput="${logger}" onmouseover=${logger}>
<option value="mono">Mono</otion>
<option value="serif">Serif</otion>
</select>
`
Any ideas why this could be and how to get around this issue? (Other than adding the event listeners externally?)
Kyle Robinson Young commented
The attribute oninput="${logger}"
should be unquoted: oninput=${logger}
.
Bálint Fülöp commented
😅
Sorry it's just one those times when you should just take break instead of mindlessly hitting the keyboard...
Thanks for the quick reply, saved my day!