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

disabled bubbling for the click event used to download the file

Gildas 7 лет назад
Родитель
Сommit
46c93cf7f5
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      extension/core/scripts/content/client.js

+ 2 - 2
extension/core/scripts/content/client.js

@@ -18,7 +18,7 @@
  *   along with SingleFile.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-/* global chrome, SingleFile, singlefile, document, Blob */
+/* global chrome, SingleFile, singlefile, document, Blob, MouseEvent */
 
 (() => {
 
@@ -68,7 +68,7 @@
 		document.body.appendChild(link);
 		link.download = page.filename;
 		link.href = page.url;
-		link.click();
+		link.dispatchEvent(new MouseEvent("click"));
 		link.remove();
 	}