From 3fa91ecf68888362ea980dd934b74b7b729219e3 Mon Sep 17 00:00:00 2001 From: Daniel Calviño Sánchez Date: Fri, 17 Dec 2021 07:24:38 +0100 Subject: 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 --- core/js/dist/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/js/dist/main.js') diff --git a/core/js/dist/main.js b/core/js/dist/main.js index f98111541b8..aa3037d5951 100644 --- a/core/js/dist/main.js +++ b/core/js/dist/main.js @@ -232,7 +232,7 @@ const C={create:"POST",update:"PROPPATCH",patch:"PROPPATCH",delete:"DELETE",read * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see . * - */const H={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,i){this.message(e,t,"alert",H.OK_BUTTON,n,i)},info:function(e,t,n,i){this.message(e,t,"info",H.OK_BUTTON,n,i)},confirm:function(e,t,n,i){return this.message(e,t,"notice",H.YES_NO_BUTTONS,n,i)},confirmDestructive:function(e,t,n,i,r){return this.message(e,t,"none",n,i,void 0===r||r)},confirmHtml:function(e,t,n,i){return this.message(e,t,"notice",H.YES_NO_BUTTONS,n,i,!0)},prompt:function(e,n,i,r,o,a){return s.a.when(this._getMessageTemplate()).then((function(l){var u="oc-dialog-"+H.dialogsCounter+"-content",c="#"+u,h=l.octemplate({dialog_name:u,title:n,message:e,type:"notice"}),p=s()("");p.attr("type",a?"password":"text").attr("id",u+"-input").attr("placeholder",o);var f=s()("