Skip to content

Firefox ESR 17.0.9 - vim-in-textarea - on_keypress problem #16

@atihonovschi

Description

@atihonovschi

When trying to use vim-in-textarea I've encountered next problem:
textarea seems to not react on any keypresses. There is no possibility to enter insert mode / invoke commands. It seems that on_keypress receive events with event.keyCode == 0. The workaround was to change on_keypress function.
Was:

this.on_keypress = function(event) {
var m = String.fromCharCode( event.keyCode )
var p = this.on_key( m, event )
return p
}

Workaround:

this.on_keypress = function(event) {
var code = event.keyCode || event.charCode
var m = String.fromCharCode( code )
var p = this.on_key( m, event )
return p
}

I have not tested this in any other browser...

Thank you for your work!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions