From 738ca085cc9f6a9d77659435bb6a8532bf0394d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Calvi=C3=B1o=20S=C3=A1nchez?= Date: Fri, 17 Dec 2021 07:24:38 +0100 Subject: [PATCH] Fix persistent tooltip in the "new folder" input of the file picker MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: nextcloud-command --- core/js/dist/login.js | 2 +- core/js/dist/login.js.map | 2 +- core/js/dist/main.js | 2 +- core/js/dist/main.js.map | 2 +- core/src/OC/dialogs.js | 4 ++++ 5 files changed, 8 insertions(+), 4 deletions(-) diff --git a/core/js/dist/login.js b/core/js/dist/login.js index b2c87a0846a34..485ba22c10d42 100644 --- a/core/js/dist/login.js +++ b/core/js/dist/login.js @@ -68,7 +68,7 @@ a.version="2.29.1",t=kt,a.fn=gn,a.min=function(){var e=[].slice.call(arguments,0 * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see . * - */var I={YES_NO_BUTTONS:70,OK_BUTTONS:71,FILEPICKER_TYPE_CHOOSE:1,FILEPICKER_TYPE_MOVE:2,FILEPICKER_TYPE_COPY:3,FILEPICKER_TYPE_COPY_MOVE:4,FILEPICKER_TYPE_CUSTOM:5,dialogsCounter:0,alert:function(e,t,n,r){this.message(e,t,"alert",I.OK_BUTTON,n,r)},info:function(e,t,n,r){this.message(e,t,"info",I.OK_BUTTON,n,r)},confirm:function(e,t,n,r){return this.message(e,t,"notice",I.YES_NO_BUTTONS,n,r)},confirmDestructive:function(e,t,n,r,a){return this.message(e,t,"none",n,r,void 0===a||a)},confirmHtml:function(e,t,n,r){return this.message(e,t,"notice",I.YES_NO_BUTTONS,n,r,!0)},prompt:function(e,n,r,a,i,o){return s.a.when(this._getMessageTemplate()).then((function(u){var l="oc-dialog-"+I.dialogsCounter+"-content",c="#"+l,f=u.octemplate({dialog_name:l,title:n,message:e,type:"notice"}),p=s()("");p.attr("type",o?"password":"text").attr("id",l+"-input").attr("placeholder",i);var m=s()("