Add select all text on focus. See #492
This commit is contained in:
parent
1632a8f364
commit
74892a3130
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue
Block a user