Open dcsaszar opened 8 years ago
+1
This could definitely be related to #1178 , so if anyone investigates fixing either issue please try to investigate both at the same time.
5087f4b84206aa7c76fe91204bff26f094dc1cb9 is the last working commit after that the dist is broken for a while (7 commits in the history of https://github.com/yabwe/medium-editor/commits/master/src/js/extensions/paste.js) 3cc4165da287a4987a1e4807f4d24581dcffc698 has a working dist and shows the issue
One of the causes appears to be setting the .focus()
to the pasteBin. If I comment out this line, it works.
I don't know why we need the focus()
on the paste bin. So, currently I see two possible solutions:
this.getEditorElements()[0].appendChild(pasteBinElm);
)Focus is needed so the content you just pasted is written into the paste bin. Otherwise the whole pastebin shouldn't work. I think we should better put the focus back to the editable element when pasting is done.
How would I know the pastebin isn't working? I tried deleting the focus stuff and successfully pasted in the default index.html in Firefox and Chrome.
Well, if what you pasted was actually pasted, it means the whole paste stuff is working. Which looks strange without the focus :neutral_face:
I'll open a PR and you can have a look.
Description
The editable area loses the (visible) input cursor after pasting text in Firefox. Chrome is fine.
Steps to reproduce
Expected behavior: [What you expected to happen]
Actual behavior: [What actually happened]
Versions