From 4b93e1768c2a789aea0c235b8186590db8880489 Mon Sep 17 00:00:00 2001 From: Rich Date: Thu, 9 Feb 2023 22:29:16 +0100 Subject: [PATCH] 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 --- www/common/toolbar.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/www/common/toolbar.js b/www/common/toolbar.js index a827364e6..c1595cd2c 100644 --- a/www/common/toolbar.js +++ b/www/common/toolbar.js @@ -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(); };