Email or username:

Password:

Forgot your password?
Top-level
Marius Gundersen

@jaffathecake I would vote for doing nothing by default, and having the other scenarios solved with js. If you need it to do something advanced then bring a bit of javascript code to do that. It's much better than having to do something weird or performance problematic by default with only a complicated way to prevent it.

3 comments
Jake Archibald

@gundersen as in, the first option in the article, or something even less?

Marius Gundersen

@jaffathecake first option, but maybe even without the resetOption(). It's not difficult to clone the option and replace the value manually, is it?

Jake Archibald

@gundersen that's fair. selectedOption.replaceChildren(...select.selectedOptions[0].cloneNode(true).childNodes)

Go Up