From aa999e13c50c00448a1985e74df0a80340854868 Mon Sep 17 00:00:00 2001 From: RobinLinus Date: Thu, 11 Oct 2018 00:38:06 +0200 Subject: [PATCH] iOS Refactor fallback hack --- client/scripts/ui.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/client/scripts/ui.js b/client/scripts/ui.js index 7cde98b..dbaf98b 100644 --- a/client/scripts/ui.js +++ b/client/scripts/ui.js @@ -239,11 +239,9 @@ class ReceiveDialog extends Dialog { if (window.isDownloadSupported) return; // fallback for iOS - $a.href = '#'; + $a.target = '_blank'; let reader = new FileReader(); - reader.onload = e => { - $a.onclick = e=>window.open(reader.result,'_blank'); - } + reader.onload = e => $a.href = reader.result; reader.readAsDataURL(file.blob); }