Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot copy more than 1000 characters out of CodeMirror buffer #768

Closed
Pointy opened this issue Sep 1, 2015 · 6 comments
Closed

Cannot copy more than 1000 characters out of CodeMirror buffer #768

Pointy opened this issue Sep 1, 2015 · 6 comments

Comments

@Pointy
Copy link

Pointy commented Sep 1, 2015

This is a really weird problem, and it's only been happening to me for a relatively short while now. First, I'm using jsbeautifier.org from Firefox 40 on Ubuntu Linux, and have been doing so for a long time (obviously with earlier versions of Firefox in the past). I have Firebug installed, but I'm pretty sure this doesn't have anything to do with Firebug as it happens whether it's enabled or not.

I very often use jsbeautifier.org to reformat horribly-formatted JavaScript from Stackoverflow questions. What I started noticing about 2 weeks ago was that I could copy-paste from Stackoverflow into the beautifier CodeMirror box and get correctly-formatted code. However, when I tried to copy-paste back to Stackoverflow, I'd get just a "-" in my clipboard. That would be the case wherever I attempted to paste, so I'm pretty sure that the browser was only putting a single character into the clipboard. Some tests revealed that so long as I selected exactly 1000 characters or less in the CodeMirror view, it would work - I could copy-paste out of jsbeautifier.org into anywhere successfully. However, 1001 or more characters (and it doesn't seem to matter what characters are involved), and it doesn't work.

Using the "plain textarea" version of jsbeautifier.org, everything does work just fine, and I can copy-paste arbitrary amounts of text out of the textarea.

@Pointy
Copy link
Author

Pointy commented Sep 1, 2015

See also this issue I logged with CodeMirror.

@Pointy
Copy link
Author

Pointy commented Sep 2, 2015

Because the version of CodeMirror used with the jsbeautifier web UI is apparently outdated, the CodeMirror crew closed that other issue. A maintainer did however exhibit suspicion that CodeMirror might be at least part of the problem.

@bitwiseman
Copy link
Member

Please feel free to submit a PR to get a newer version of codemirror.

@Pointy
Copy link
Author

Pointy commented Nov 11, 2015

Can this PR be a PR to get a newer version of codemirror?

@bitwiseman
Copy link
Member

Updated in a6656f9.

@bitwiseman
Copy link
Member

This is live on the website now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants