Fix savetarget frame use (#5897)

pull/5917/head
Aleksander Machniak 7 years ago
parent 3f6ca2cffc
commit cf9019e462

@ -4789,20 +4789,15 @@ function rcube_webmail()
// Create (attach) 'savetarget' iframe before use // Create (attach) 'savetarget' iframe before use
this.get_save_target = function() this.get_save_target = function()
{ {
if (!this.save_target) { $('<iframe>').attr({
this.save_target = $('<iframe>').attr({
name: "savetarget", name: "savetarget",
src: "about:blank",
style: "width:0;height:0;visibility:hidden;", style: "width:0;height:0;visibility:hidden;",
'aria-hidden': "true" 'aria-hidden': "true"
}); })
}
this.save_target
.detach()
.attr('src', "about:blank")
.appendTo('body') .appendTo('body')
// Removing savetarget frame to workaround issues with window history // Removing savetarget frame to workaround issues with window history
.on('load error', function() { $(this).detach(); }); .on('load error', function() { $(this).remove(); });
return 'savetarget'; return 'savetarget';
}; };

Loading…
Cancel
Save