Auto-select document name on edit if it's still the default

A small convenience to enable clicking a document name and immediately
typing the name, if it hasn't been set already
This commit is contained in:
Rich 2023-02-09 22:29:16 +01:00
parent 508a07200c
commit 4b93e1768c
1 changed files with 4 additions and 0 deletions

View File

@ -764,6 +764,10 @@ MessengerUI, Messages, Pages) {
$input.val(inputVal);
$input.show();
$input.focus();
if (inputVal === $input.attr('placeholder')) {
// Placeholder is the default name, select text to make editing easier
$input.select();
}
$pencilIcon.hide();
$saveIcon.show();
};