Space key (blank) " " does nothing

Hi,
I use CodeMirror.version = “4.12.1” (same with 4.12.0)
in google-chrome or firefox on Linux.

When I hit the “Space” key (keyCode 32) inside the editor nothing happens,
the other keys work fine.

The Editor ist embedded into qooxdoo.org 4.1 desktop (testing your editor on your demo page works fine).

I have now the impression that some timing issues in combination with qooxdoo prevents codemirror to process the key properly.

onKeyPress(e) {}
is called
var ch = String.fromCharCode(charCode == null ? keyCode : charCode);
ch contains the " "
but does not draw the blank.

function dispatchKey(cm, name, e, handle)
is run similar for a good key (eg ‘5’) as for the failing key ‘Space’.
How does a key end up to be visible in the editor?

Interesting is that when setting a break-point into dispatchKey()
all key-hits don’t work. Looks like some timing issue involved when processing …

Is there any workaround possible?

Thank you
Marcel

Nothing comes to mind. The way to figure out what’s happening here would be to start with a Qooxdoo page, and reduce it until the problem no longer appears.

I did not find the proper solution.

So I have introduced this hack:
I catch the qooxdoo event and insert the " " manually:

this.addListener(“keypress”, function(e){
// Ugly hack: CodeMirror did not draw the “Space”
// now we catch the qooxdoo keypress and add it ourself
if (e._keyCode == 32 && this.myCodeMirror) { // “Space"
var cursor = this.myCodeMirror.getCursor();
this.myCodeMirror.replaceRange(” ", CodeMirror.Pos(cursor.line, cursor.ch));
}

Thanks
Marcel