summaryrefslogtreecommitdiffstats
path: root/core/src
diff options
context:
space:
mode:
authorDaniel Calviño Sánchez <danxuliu@gmail.com>2021-12-17 07:24:38 +0100
committerDaniel Calviño Sánchez <danxuliu@gmail.com>2021-12-20 20:14:39 +0100
commit3fa91ecf68888362ea980dd934b74b7b729219e3 (patch)
tree84a9324c4b9c43593a06a7f400967a7abaf96b0c /core/src
parent59290060c77b2ec19e418992d8e3efa2c67cda4b (diff)
downloadnextcloud-server-3fa91ecf68888362ea980dd934b74b7b729219e3.tar.gz
nextcloud-server-3fa91ecf68888362ea980dd934b74b7b729219e3.zip
Fix persistent tooltip in the "new folder" input of the file picker
When a new folder is tried to be created in the file picker dialog a tooltip is shown on the input if the folder name exists already. However, this tooltip was not cleared, so it was still shown even if the name was fixed, the folder was created and then the "New folder" input was shown again. Now the tooltip is cleared as soon as the input changes, as keeping it shown in that case did not provide any benefit either (and it is consistent with how the "new folder" input works in the Files app view). The input is also cleared whenever the menu that shows the input is opened again, as otherwise the tooltip would be still shown if the menu was closed and opened again without changing the input (and the menu could be opened again after changing to another directory where the new folder name is no longer duplicated). Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to 'core/src')
-rw-r--r--core/src/OC/dialogs.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/src/OC/dialogs.js b/core/src/OC/dialogs.js
index 82e4c932a68..1c3962f6f16 100644
--- a/core/src/OC/dialogs.js
+++ b/core/src/OC/dialogs.js
@@ -327,6 +327,7 @@ const Dialogs = {
})
OC.registerMenu(newButton, self.$filePicker.find('.menu'), function() {
+ $input.tooltip('hide')
$input.focus()
self.$filePicker.ocdialog('setEnterCallback', function() {
event.stopImmediatePropagation()
@@ -427,6 +428,9 @@ const Dialogs = {
$form.submit()
}
})
+ $input.on('input', function(event) {
+ $input.tooltip('hide')
+ })
self.$filePicker.ready(function() {
self.$fileListHeader = self.$filePicker.find('.filelist thead tr')