hackmd-io-issues icon indicating copy to clipboard operation
hackmd-io-issues copied to clipboard

Can not paste image from clipboard

Open sciyen opened this issue 3 years ago • 4 comments

Is this a hackmd.io issue?

  • [x] Yes, the bug happens on https://hackmd.io
  • [ ] No. If it's a self-hosted CodiMD instance, please fire up the issue in the repo of CodiMD: https://github.com/hackmdio/codimd

What's the problem

I can not paste an image from clipboard, which outputs the following errors:

index.e9b7d4f516d61d3c8942.js:209 Uncaught TypeError: Cannot read properties of null (reading 'type')
    at t.value (index.e9b7d4f516d61d3c8942.js:209)
    at t.value (index.e9b7d4f516d61d3c8942.js:209)
    at t.value (index.e9b7d4f516d61d3c8942.js:209)
    at t.value (index.e9b7d4f516d61d3c8942.js:209)
    at t.value (index.e9b7d4f516d61d3c8942.js:209)
    at index.e9b7d4f516d61d3c8942.js:209
    at z (eval at e.exports (index-common.4599673c9654fa0ae31a.js:1), <anonymous>:1:3612)
    at O (eval at e.exports (index-common.4599673c9654fa0ae31a.js:1), <anonymous>:1:3735)
    at HTMLTextAreaElement.eval (eval at e.exports (index-common.4599673c9654fa0ae31a.js:1), <anonymous>:5:25945)

The edit panel doesn't show anything. However, I found it works fine in Firefox (in the same OS).

Current behaviour

Screenshot (optional)

Provide steps to reproduce:

  1. Screenshot an image with ctrl+shift+printscreen
  2. Paste it to the edit panel
  3. See error

I encountered this problem even it is a blank note.

Environment

I use HackMD on:

Desktop

  • OS: Ubuntu 20.04 (Desktop)
  • Browser: Chrome Version 93.0.4577.63 (Official Build) (64-bit)

sciyen avatar Jan 24 '22 13:01 sciyen

It was a killer feature why I'm using hackmd. Please fix it.

morm avatar Jan 25 '22 13:01 morm

Hi guys, We have investigated this issue but can't reproduce it. Could you let us know where and how did you copy the image into the clipboard?

jackycute avatar Jan 25 '22 13:01 jackycute

Hi, thank you for quick response. In my case I can't upload image even with the "Insert" button. image

I managed to paste image from alt+prtscr but failed by Copy image in Chrome browser

morm avatar Jan 25 '22 17:01 morm

The problem seems to be solved after I reinstalled the Chrome. @morm maybe you can try this method?

sciyen avatar Feb 08 '22 03:02 sciyen