diff --git a/app.js b/app.js index deb8e8e..b1df6c3 100644 --- a/app.js +++ b/app.js @@ -631,6 +631,7 @@ function addFileMessage(from, fileName, fileUrl, fileType, avatar, topic) { const $img = document.createElement('img'); $img.src = updatePortInUrl(avatar) || 'https://via.placeholder.com/40'; $img.classList.add('avatar'); + $img.draggable = false; $div.appendChild($img); const $content = document.createElement('div'); @@ -695,6 +696,7 @@ function onMessageAdded(from, message, avatar, topic, timestamp) { const $img = document.createElement('img'); $img.src = updatePortInUrl(avatar) || 'https://via.placeholder.com/40'; // Default to a placeholder image if avatar URL is not provided $img.classList.add('avatar'); + $img.draggable = false; $div.appendChild($img); const $content = document.createElement('div'); @@ -777,6 +779,7 @@ function addAudioMessage(from, audioUrl, avatar, topic) { const $img = document.createElement('img'); $img.src = updatePortInUrl(avatar) || 'https://via.placeholder.com/40'; $img.classList.add('avatar'); + $img.draggable = false; $div.appendChild($img); const $content = document.createElement('div'); @@ -939,4 +942,4 @@ async function connectToAllRooms() { // Call this function when loading the rooms initially renderRoomList(); -initialize(); \ No newline at end of file +initialize(); diff --git a/style.css b/style.css index 6d0f986..a48d1e1 100644 --- a/style.css +++ b/style.css @@ -444,6 +444,7 @@ main { border-radius: 50%; margin-right: 0.5rem; border: 2px solid #464343; + user-select: none; } .message-content {