Copy/Cut/Paste not available in context-menu #3238
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This is Chrome on OSX
copy/cut/paste isn't available on any browser on any OS. Im using angular ui-codemirror but ive tried initializing it manually and have the same problem so I don't think its related.
The options I'm using are:
Does the problem occur on the demos on http://codemirror.net? I just tried (Chrome 42, Mountain Lion), and copy/paste from the context menu worked fine.
Well, yes, the demos work, and after some digging I realized that the fix I did here
is what caused the context menu yo stop working correctly. So my real issue is the text box showing up when right clicking and never going away. If I need to create a new ticket I will.
github.com/yelvert/CodeMirror@714cf11e6cto fixmentioned in issue #3241
I'm experiencing the same issue. The demos on CodeMirror's website are fine (I have copy/cut/paste in the context menu), but in the editor we use in our application, no dice in any browser. Is there a workaround I could use to work around this issue? Thank you.
Try to narrow it down -- something in your site is causing it, so remove pieces one by one until it goes away, then figure out what precise line did it. It is likely a CSS conflict, but might be something else.
I can reproduce this in Chrome using the example given in #2154 (http://output.jsbin.com/ihunin/328/). Thus that is not only a FF bug.
The editor is in my case in a modal screen which has transform CSS options. When I move the editor out of the modal screen it does work.
Any clue? I guess using a CSS transform should not remove copy/paste functionallity.
In the JSBin case, it seems to be caused by a mysterious no-op CSS transform they inject:
Why a zero-translate would have an effect on the position of the textarea I don't know.
Actually, some further testing suggests that a 3d transform prevents the trick where CodeMirror puts a textarea under the cursor from working because it makes it appear on the screen asynchronously, possibly due to some interaction with the graphics hardware being needed, which prevents the context menu click from taking effect on that textarea.
So yeah, 3d transforms on the body break CodeMirror's textarea hack.
Hold on, I misdiagnosed that. It's not about async/sync relayout, it's about a weird position computation for a
position: fixedelement in a body that has a transform. You can see the effect using this test HTML:Chrome and Firefox share this behavior so I guess it is somehow standard? Seems somewhat awful regardless.
Okay, I'll stop spamming soon. It appears that you can't use
position: fixedin its normal way inside of a transformed container. This means that JSBin appears to be breaking fixed positioning, and that you have to be pretty careful with transforms in general.Mm that sucks :/. Thanks for helping me out here!
The thing is: my use case is pretty normal (I guess) as I am rendering Codemirror inside of a Bootstrap modal. The
modal-dialogclass uses atransformoftranslate3d(0, 0, 0)(new versions use a 2d transform; but they fail as well).I think attached patch helps here.
And.. it's gone! That totally fixes the problem. Thank you very much for helping out. Once new release lands I'll update.
PS. also thank you for your awesome book that I'll pass around to new faces at our company ;)
mentioned in issue #3827
mentioned in merge request !11267
I have had to revert this fix -
github.com/codemirror/CodeMirror@dfeafe0c14- when loading CodeMirror inside an iframe.Does anyone else experience this?
mentioned in issue #71
mentioned in issue #7