4

The Image button on this site gives the dialogue below, which mentions the ability to paste in an image.

StackExchange paste dialog

However, I can't get this to work in Safari (6.0.4) on OS X (10.8.3). I can drag a file in, but I'd like to be able to use cmd-shift-ctrl-4 to put a screenshot on the clipboard, then paste that in, because that feels a little faster. However, pressing cmd-v seems to do nothing.

Am I missing something?

  • Are you using Safari on Mac, PC or iOS? – bmike Jun 2 '13 at 0:13
  • 1
    @bmike I think that the presence of the cmd key would say OS X – Undo Jun 2 '13 at 22:39
  • @bmike Mac OS X 10.8.3... sorry for not making that clear. – Ashley Jun 2 '13 at 23:23
  • @Undo I use a Mac keyboard with iPad/iPhone daily - sometimes exclusively. You are right the clues made it nearly certain OS X, but I wanted to be sure. – bmike Jun 2 '13 at 23:55
  • @bmike Seems likely this is a StackExchange on Safari issue (see Jason Salaz's answer). I wonder if you have an idea how to report the issue to StackExchange? – Ashley Jun 3 '13 at 0:13
  • 1
    Ashley - I've tagged it as a bug, so that will bubble it up to a developer to respond. If you want to answer this to explain exactly how you would like it to work, that often lets other people vote up your proposed solution as well as let the dev team know exactly what the use case is. You've reported it - so we wait now for it to get looked at. – bmike Jun 3 '13 at 2:09
  • @bmike Thank you: I've done that. – Ashley Jun 3 '13 at 14:33
2

Am I missing something?

Only that you need to save the file to disk before uploading it to the site. The browser can't upload the contents of your system clipboard to imgur, which is where images end up getting hosted for the StackExchange network.

When it says "paste or drag-and-drop" they mean you can paste a path to a file on your hard drive. When you paste or drag-and-drop the image the dialog gets the path to the file and uses that to push the file to imgur. It doesn't get the contents of the file directly.

  • Pasting a path as well as drag-and-drop don't seem to work reliable with Safari (didn't test with other browsers), at least I got mixed results in the last few weeks. – nohillside Jun 2 '13 at 8:08
  • 1
    I don't think that's entirely true. Imgur supports pasting from your clipboard. Pretty sure StackExchange implemented it in the same manner. – Jason Salaz Jun 2 '13 at 19:24
  • @JasonSalaz I just created an account at Imgur. I copied a screenshot to my clipboard, then went to my Imgur "images" page and pressed cmd-v, as instructed on the website, but Edit > Paste was greyed out and Safari just beeped :( I use a Flash blocker... I turned that off, but it made no difference. What steps do you follow to paste from the clipboard into Imgur? – Ashley Jun 3 '13 at 14:40
  • @JasonSalaz I was unable to paste to imagur from the clibpoard when I tried today. – Ben Collins Jun 5 '13 at 2:25
  • @JasonSalaz likewise, has never worked for me in Safari. This goes back to what I said about access to the clipboard contents. Looks like it's inconsistent between browsers. – Ian C. Jun 5 '13 at 20:18
  • Yes, I believe this is a Safari problem. – Jason Salaz Jun 5 '13 at 20:26
2

Here's how I'd like this StackExchange feature to work (noted here as suggested by @bmike, since the question is now tagged as a bug):

  1. Start writing a question or answer on StackExchange in Safari on OS X.
  2. Use cmd-shift-ctrl-4 to take a screenshot and put it into the clipboard.
  3. Press the Image button at the top of the StackExchange editor window.
  4. Press cmd-v to paste the screenshot from the clipboard into the editor.

Expected: the screenshot appears in the editor, as it would if I'd saved it to a file and then dragged it in. This is what happens in the Chrome browser.

Actual: at step 4, the Safari Edit > Paste menu option is greyed out, and Safari beeps.

I don't know if this is a Safari or a StackExchange issue, but I would find this process a little quicker and more satisfying than saving a file to local disk before uploading.

1

If it doesn't work, this sounds like a Safari issue. Running those steps just worked in Chrome. After I hit paste, the dialog box changed to this:

Yes, I have too many tabs open

Which allowed me to click confirm and upload the image. You may want to click within the whitespace of the dialog box in order to ensure that it has focus, and then hit ⌘v

  • Thanks: I've just tried Chrome, and that works as you describe for me. Now... any idea how to report the issue to stackexchange? – Ashley Jun 2 '13 at 23:28
  • Based off your other comment, I don't think it's StackExchange's problem to fix. Sounds like Safari doesn't support clipboard image pasting. – Jason Salaz Jun 3 '13 at 20:16
0

My initial reaction is that this is a Safari issue. It's not just "you can't paste stuff in Safari", because Safari purportedly supports the Javascript Cliboard APIs. I've marked this as [status-review] until I can pin this down for sure and will update this answer when I have something more definitive to share.

Update:

This does appear to be a browser issue. I've reproduced the described behavior. I also tried on imgur to see if it would respond in the same way, and it does: dong...nothing happens. I experimented a bit in jsfiddle to see if the event is handled as documented, and I don't think it is. I'll keep looking into this for a while, but unless something I didn't already know is brought to my attention, I expect to status-decline this later this week.

  • It appears that Safari will only send the paste event when an editable field is selected, and even then it doesn't seem to provide access to image data. – ughoavgfhw Jun 5 '13 at 3:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .