aboutsummaryrefslogtreecommitdiff
path: root/juick-www/src/main/static
diff options
context:
space:
mode:
Diffstat (limited to 'juick-www/src/main/static')
-rw-r--r--juick-www/src/main/static/scripts.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/juick-www/src/main/static/scripts.js b/juick-www/src/main/static/scripts.js
index 7dc24dd2..e33d1929 100644
--- a/juick-www/src/main/static/scripts.js
+++ b/juick-www/src/main/static/scripts.js
@@ -292,7 +292,9 @@ function newMessage(evt) {
document.querySelectorAll('#newmessage .dialogtxt').forEach(t => {
t.remove();
});
- if (document.querySelector('#newmessage textarea').value.length == 0) {
+ if (document.querySelector('#newmessage textarea').value.length == 0
+ && document.querySelector('#newmessage .img').value.length == 0
+ && !document.querySelector('#newmessage input[type="file"]')) {
document.querySelector('#newmessage').insertAdjacentHTML('afterbegin', `<p class="dialogtxt">${i18n('postForm.pleaseInputMessageText')}</p>`);
evt.preventDefault();
}