From 74892a313078a872ce1a871cd96c7d64027ac778 Mon Sep 17 00:00:00 2001 From: Rob Garrison Date: Tue, 4 Sep 2018 21:17:36 -0500 Subject: [PATCH] Add select all text on focus. See #492 --- manage/config-dialog.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/manage/config-dialog.js b/manage/config-dialog.js index 796ce88a..121c0e36 100644 --- a/manage/config-dialog.js +++ b/manage/config-dialog.js @@ -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;