Add select all text on focus. See #492

This commit is contained in:
Rob Garrison 2018-09-04 21:17:36 -05:00
parent 1632a8f364
commit 74892a3130

View File

@ -264,6 +264,7 @@ function configDialog(style) {
type: va.type,
onchange: updateVarOnChange,
oninput: updateVarOnInput,
onfocus: focusInput,
};
if (va.type === 'range') {
options.min = va.range[0];
@ -313,6 +314,10 @@ function configDialog(style) {
}
}
function focusInput(event) {
event.target.select();
}
function renderValues(varsToRender = vars) {
for (const va of varsToRender) {
const value = isDefault(va) ? va.default : va.value;