jnordberg / gif.js

JavaScript GIF encoding library
http://jnordberg.github.io/gif.js/
MIT License
4.74k stars 668 forks source link

Chrome failing to open blob in new window/tab #71

Open evitolins opened 7 years ago

evitolins commented 7 years ago

It seems a recent release of Chrome (Version 56.0.2924.87 (64-bit)) is blocking the ability to open a new window with the blob.

window.open(URL.createObjectURL(blob));

This doesn't seem to be gif.js specific, but probably good to explore other options, or at least note it in the documentation.

mvivekc commented 6 years ago

Were u able to solve this?

mscststs commented 6 years ago

try to convert the Blob object to base64 : )

1j01 commented 6 years ago

You can create a link with document.createElement("a"), setAttribute("target", "_blank") and call click() on it during a gesture event like another click (but it can be on a button for instance). You can setAttribute("download", "animation.gif") to suggest a filename, or just setAttribute("download", "") to mark it as a download.

gromsterus commented 6 years ago

If you're using AdBlock, it can close tab with blob url ;(

tursumbekov commented 6 years ago

https://stackoverflow.com/questions/43283454/open-blob-objecturl-in-chrome/51101272#51101272

ajay-verma-01 commented 5 years ago

@evitolins Have you able to resolve it? I am facing same issue and not able to open blob(pdf) in browser.

ghost commented 5 years ago

Many thanks gromsterus! I had the same problem and it was Adblock !!!!!

oTranQuangTrung commented 5 years ago

I had the same problem, and cause is the Adblock (facepalm)

minhoyooDEV commented 5 years ago

If you're using AdBlock, it can close tab with blob url ;(

your my life saver

LennonCecere commented 5 years ago

I had the same problem, and cause is the Adblock

evitolins commented 5 years ago

I'll have to verify but I do have uBlock running. If confirmed, I'll close the ticket. Thanks everyone!

iammohsinar commented 4 years ago

If you're using AdBlock, it can close tab with blob url ;(

had same issue after closing adblock, its resovled!

sharansp commented 4 years ago

I had the same problem, and cause is the Adblock

Thanks!