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

Weird issue when applying certain styles to textarea... #48

Closed
chiel opened this issue Mar 24, 2011 · 6 comments
Closed

Weird issue when applying certain styles to textarea... #48

chiel opened this issue Mar 24, 2011 · 6 comments

Comments

@chiel
Copy link

chiel commented Mar 24, 2011

Hi!

So, my CodeMirror was lagging like crazy in Chrome, like I reported earlier, due to unknown reasons. Today I finally had some time to spare and tried to dig into this issue. I am glad to say after a LOT of trial and error I pinpointed the cause.

It's nothing to do with JS, it's in CSS. And it's not even to do with CSS applied to CodeMirror...

Adding the following CSS to the index.html in the root of the project will make the editor go berserk in chrome:

textarea {
    width: 100%;
    padding: 0;
    border: 0;
}

I don't know why, or how... but this just makes CodeMirror lag like crazy, and the cursor won't position properly etc. Of course this is very much a cornercase, but I find it pretty curious nonetheless.

Hope this helps.

Chiel

@marijnh
Copy link
Member

marijnh commented Mar 25, 2011

I can't really explain why this happens (especially since it only happens when all three CSS rules are present), but setting a width for CodeMirror's hidden textarea (22ee5fb) solves it.

@marijnh marijnh closed this as completed Mar 25, 2011
@chiel
Copy link
Author

chiel commented Mar 25, 2011

Awesome, thanks a lot!

@michaelficarra
Copy link

Maybe the chromium devs would be interested in this issue, no?

@marijnh
Copy link
Member

marijnh commented Mar 25, 2011

Yeah, but it'd probably be a few hours work to distil a useful demo case out of the CodeMirror codebase (they typically don't want to wade through a huge system to pinpoint a bug). I don't currently have the time to spare.

@chiel
Copy link
Author

chiel commented Mar 25, 2011

If it's something in Chromium, I bet they'd be interested. But setting up a test for a bug like this likely takes some time (ensure it's not something in codemirror etc). And even then, it's such a corner-case, for which there is simply not enough time to spare at the moment, I guess.

@michaelficarra
Copy link

Well, for when you have a moment to spare: http://code.google.com/p/chromium/issues/entry

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

3 participants