Select all when the snapshot size field gets focus.

This commit is contained in:
kovacsv 2022-04-30 09:16:40 +02:00
parent 556f5c48f1
commit 2e93a9b3d4

View File

@ -55,6 +55,9 @@ export function ShowSnapshotDialog (viewer)
AddDiv (line, 'ov_snapshot_dialog_param_name', text);
let numberInput = AddNumberInput (line, 'ov_dialog_text', onChange);
numberInput.classList.add ('ov_snapshot_dialog_param_value');
numberInput.addEventListener ('focus', () => {
numberInput.setSelectionRange (0, numberInput.value.length);
});
return numberInput;
}