зеркало из https://github.com/nextcloud/spreed.git
Focus again on new message input after sending a message
Some browsers (like Firefox) automatically return the focus to the new message input after sending a message, while others (like Chromium) do not. Now the focus is explicitly given back to the new message input to make more comfortable to keep writing new messages. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
This commit is contained in:
Родитель
63111646f5
Коммит
d20dbf6ece
|
@ -302,6 +302,8 @@
|
|||
$form.find('.submitLoading').addClass('hidden');
|
||||
$form.find('.message').text('').prop('contenteditable', true);
|
||||
|
||||
$form.find('.message').focus();
|
||||
|
||||
// The new message does not need to be explicitly added to the list
|
||||
// of messages; it will be automatically fetched from the server
|
||||
// thanks to the auto-refresh of the list.
|
||||
|
@ -312,6 +314,8 @@
|
|||
$form.find('.submitLoading').addClass('hidden');
|
||||
$form.find('.message').prop('contenteditable', true);
|
||||
|
||||
$form.find('.message').focus();
|
||||
|
||||
OC.Notification.show(t('spreed', 'Error occurred while sending message'), {type: 'error'});
|
||||
},
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче