From 5bb37da90913c1dd9ea96270c8fa6a92c1ebda75 Mon Sep 17 00:00:00 2001 From: Kobe Date: Tue, 27 May 2025 15:22:43 +0200 Subject: [PATCH] Update room.html --- templates/rooms/room.html | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/templates/rooms/room.html b/templates/rooms/room.html index d47f95c..c867cbb 100644 --- a/templates/rooms/room.html +++ b/templates/rooms/room.html @@ -1140,6 +1140,10 @@ function showRenameModal(filename) { } var modal = new bootstrap.Modal(document.getElementById('renameModal')); modal.show(); + // Focus the input field after the modal is shown + setTimeout(() => { + document.getElementById('renameInput').focus(); + }, 100); } document.getElementById('confirmRenameBtn').addEventListener('click', function() { @@ -1370,6 +1374,10 @@ document.addEventListener('DOMContentLoaded', function() { document.getElementById('folderNameInput').value = ''; document.getElementById('folderError').textContent = ''; newFolderModal.show(); + // Focus the input field after the modal is shown + setTimeout(() => { + document.getElementById('folderNameInput').focus(); + }, 100); }); // Add click handler for create folder button