marijnh/CodeMirror2 — Issue #278: Chrome "CodeMirror-focused" Issue
Author: umrashrf
Created: 2011-12-05 09:25:27+00:00
State: open

As I realized I straight asked for help without checking what can be wrong in the code in this issue https://github.com/marijnh/CodeMirror2/issues/277 so it was straight closed.

Here is my new detailed explanation as what I think is stopping it to work properly in chrome as it works fine in firefox and IE8+. While running the same application in both browsers simultaneously, I realized that while highlighting code the main div container in chrome gets a new class added to it which is named "CodeMirror-focused" this is the same class added in firefox but as we click the container again to de-highlight code, firefox removes the class and adds again but chrome doesn't do that. This is the reason it's not letting me highlight any text. May be this can cause even keyboard not to work at all. In chrome if you click outside this container even there the class is not removed whereas in firefox it do so.

Can you help me find out what can cause it? Because if I use the same code to put a CodeMirror isolated of my code, it works but only with my piece of code it gives such behaviour.