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

Right clicking inside CodeMirror instance causes textarea to show from then on #3241

Closed
yelvert opened this issue May 6, 2015 · 8 comments
Closed

Comments

@yelvert
Copy link

yelvert commented May 6, 2015

This happens only in chrome and only in certain circumstances that I haven't been able to narrow down yet. When I right click my CodeMirror instance the hidden textarea shows up and never goes away.
image

It is caused by setting position: fixed here https://github.com/codemirror/CodeMirror/blob/master/lib/codemirror.js#L1464, but removing the position: fixed from that cssText causes the context-menu to not have copy/cut/paste #3238

@yelvert
Copy link
Author

yelvert commented May 6, 2015

It seems like Chrome doesn't respect the position: absolute when it gets changed back in the rehide function.

@yelvert
Copy link
Author

yelvert commented May 7, 2015

I have added opacity: 0 to the textarea and everything seems to work. Anyone know of any issues it might could cause?

@marijnh
Copy link
Member

marijnh commented May 8, 2015

So after putting back the cssText (which presumably contains a position: absolute) the element's .style.position is still "fixed"? I don't want to sweep the bug under the rug with an opacity: 0, I'd rather figure out what is going wrong and how we can work around it. Is there any way I can reproduce the issue?

@yelvert
Copy link
Author

yelvert commented May 8, 2015

I haven't been able to figure out what causes this bug to manifest. I can tell you that where this bug shows up for me, that the screen shot above is from, is deeply nested inside several absolute positioned elements several of which are animated. I can actually cause this bug just by setting the textarea's position to fixed, then changing it back to absolute, with 0 right clicks.

@marijnh
Copy link
Member

marijnh commented May 11, 2015

Interesting. If you can submit a (minimal) test HTML page that allows me to reproduce this, that would be useful.

@jerivemo
Copy link

Hi, I have the same problem!! Any have a good solution!!!

@marijnh
Copy link
Member

marijnh commented Sep 2, 2015

Closing until a test case shows up.

@marijnh marijnh closed this as completed Sep 2, 2015
@chrisyip
Copy link

Same issue here, we're using CodeMirror with ui-codemirror.

Don't know how to reproduce, but will submit a test HTML when I can reproduce it.

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

No branches or pull requests

4 participants