Просмотр исходного кода

Insert file names as break-separated text nodes

Co-authored-by: El RIDO <elrido@gmx.net>
Mikhail Romanov 8 месяцев назад
Родитель
Сommit
ff5aee85b4
1 измененных файлов с 3 добавлено и 3 удалено
  1. 3 3
      js/privatebin.js

+ 3 - 3
js/privatebin.js

@@ -3091,9 +3091,9 @@ jQuery.PrivateBin = (function($) {
         function printDragAndDropFileNames(fileNames) {
             $dragAndDropFileNames.empty();
             fileNames.forEach(fileName => {
-                const div = document.createElement('div');
-                div.textContent = fileName;
-                $(div).appendTo($dragAndDropFileNames);
+                const name = document.createTextNode(fileName);
+                $dragAndDropFileNames[0].appendChild(name);
+                $dragAndDropFileNames[0].appendChild(document.createElement('br'));
             });
         }