Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | Next revisionBoth sides next revision | ||
devwiki:html [2021/08/28 07:37] – [css file not loading] ying | devwiki:html [2021/12/20 07:17] – [Style related operation] ying | ||
---|---|---|---|
Line 191: | Line 191: | ||
myButtonClasses.add(" | myButtonClasses.add(" | ||
} | } | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | ===== html select dropdown and remove focus ===== | ||
+ | * problem: when select dropdown, the select focus still stuck on the dropdown list, (when you press arrow key) | ||
+ | * solution: to remove focus after choose, add onchange event and remove its focus <code javascript> | ||
+ | const choice_input = document.querySelector(" | ||
+ | choice_input.onchange = function(event){ | ||
+ | choice_input.blur() // remove focus from this input | ||
} | } | ||
</ | </ |