mirror of
https://github.com/nextcloud/server.git
synced 2026-02-20 00:12:30 -05:00
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> Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
This commit is contained in:
parent
d645869f74
commit
bcc54d06a1
5 changed files with 8 additions and 4 deletions
2
core/js/dist/login.js
vendored
2
core/js/dist/login.js
vendored
File diff suppressed because one or more lines are too long
2
core/js/dist/login.js.map
vendored
2
core/js/dist/login.js.map
vendored
File diff suppressed because one or more lines are too long
2
core/js/dist/main.js
vendored
2
core/js/dist/main.js
vendored
File diff suppressed because one or more lines are too long
2
core/js/dist/main.js.map
vendored
2
core/js/dist/main.js.map
vendored
File diff suppressed because one or more lines are too long
|
|
@ -335,6 +335,7 @@ const Dialogs = {
|
|||
})
|
||||
|
||||
OC.registerMenu(newButton, self.$filePicker.find('.menu'), function() {
|
||||
$input.tooltip('hide')
|
||||
$input.focus()
|
||||
self.$filePicker.ocdialog('setEnterCallback', function() {
|
||||
event.stopImmediatePropagation()
|
||||
|
|
@ -435,6 +436,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')
|
||||
|
|
|
|||
Loading…
Reference in a new issue