Fix on-tap for download
Signed-off-by: James Ketrenos <james_git@ketrenos.com>
This commit is contained in:
parent
ea1fb82005
commit
649e4d0964
@ -149,10 +149,7 @@ Polymer({
|
||||
},
|
||||
|
||||
download: function(event) {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
event.stopImmediatePropagation();
|
||||
|
||||
console.log("Download tapped");
|
||||
var anchor = document.createElement('a');
|
||||
anchor.href = this.src;
|
||||
anchor.setAttribute("download", this.src.replace(/.*\/([^/]+)$/, "$1"));
|
||||
@ -160,6 +157,9 @@ Polymer({
|
||||
document.body.appendChild(anchor);
|
||||
anchor.click();
|
||||
document.body.removeChild(anchor);
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
event.stopImmediatePropagation();
|
||||
},
|
||||
|
||||
close: function() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user