From d4fd229d795bf01fa77cc221bf93e020a6b09665 Mon Sep 17 00:00:00 2001 From: DianaXWiki Date: Thu, 5 Feb 2026 16:42:45 +0200 Subject: [PATCH] Fix rename issue on mobile --- www/common/drive-ui.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/www/common/drive-ui.js b/www/common/drive-ui.js index 6796596fb..0df7ce3d1 100644 --- a/www/common/drive-ui.js +++ b/www/common/drive-ui.js @@ -962,7 +962,7 @@ define([ // Replace a file/folder name by an input to change its value var displayRenameInput = function ($element, path) { // NOTE: setTimeout(f, 0) otherwise the "rename" button in the toolbar is not working - window.setTimeout(function () { + var renameInput = function () { if (!APP.editable) { return; } if (!path || path.length < 2) { logError("Renaming a top level element (root, trash or filesData) is forbidden."); @@ -1057,7 +1057,12 @@ define([ e.stopPropagation(); $input.parents('.cp-app-drive-element-row').attr("draggable", true); }); - },0); + }; + if (APP.mobile()) { + renameInput(); + } else { + window.setTimeout(renameInput, 0); + } };