Add IE11 Support for pasting images in the composer

Turns out pasting images into composer is workable in IE11

https://github.com/layerssss/paste.js

We should get it working.

5 Likes

Would love to see a community PR in this area! I assume IE11 is now standardizing here…

@falco would you be interested in researching this?

3 Likes

It looks it’s the same story as Firefox, you can only paste on ContentEditable elements. So I have a plan to extend the Firefox Pasting behavior. Should have something tomorrow.

BTW, it already works on edge.

2 Likes

Even if it is Edge only that would be fine. What we have now is a whole lot of nothing. Bonus points for researching the current state of Safari in this regard as well.

Actually, it’s already working for me on Edge (Build 38.14393.0.0)

The hack would be to add IE 11 support only. Will see what is safari state now.

2 Likes

Oh I was not aware it worked on Edge already. Ie11 support is not a priority. Safari would be way more of our audience.

Edit: remember this topic is from 2014 :sun_with_face:

4 Likes

Yes, but things aren’t looking good for Safari.

All the documentation I’ve found points to it being not possible atm…

âš“ T7916 Can't paste images from clipboard in Firefox / Safari and https://github.com/layerssss/paste.js/issues/21

Looks like Safari behave like Firefox, but provides a local-only URL inaccessible by online js.

All right, then the only news is this already works on Edge with no changes on our end? That is fine.

1 Like

And we can begin to ditch the Firefox hack when 50+ gets enough market share:

2 Likes

Did we ever revisit this @falco? Not for IE11 :rofl: but for Firefox / Safari?

I copy/paste images regularly on Safari (I’ve set up screen grabbing to save the image in clipboard). Just tested on Firefox and it works there too.

3 Likes

Right but can we remove the “Firefox hack”? Or did we already do this when @joffreyjaffeux reworked the composer? :thinking:

The hack is still there but looks like we can remove it. Pasting an image works on Firefox/Mac for me without the hack. Will do a quick test in a VM and commit if it’s good there too.

4 Likes

less code = more betterer

2 Likes

Firefox hack removed via https://github.com/discourse/discourse/commit/f400830575d800e7fb2fc206f0967773af120fa4

6 Likes

Also Firefox 50 was released November 2016. So we should be well clear of that.

3 Likes