mirror of https://github.com/xwiki-labs/cryptpad
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:
parent
508a07200c
commit
4b93e1768c
|
@ -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();
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue