I'm trying to get a simple modal activated, key strokes sitting in the background should stop listening to specific keys after it's opened. And start listening once it's closed. Any thoughts on the below structure?
var listener = new window.keypress.Listener();
listener.simple_combo("j", function() {
$("#jumper").modal({onShow: function (dialog) {
listener.stop_listening();
}});
});
I'm trying to get a simple modal activated, key strokes sitting in the background should stop listening to specific keys after it's opened. And start listening once it's closed. Any thoughts on the below structure?
var listener = new window.keypress.Listener();
listener.simple_combo("j", function() { $("#jumper").modal({onShow: function (dialog) { listener.stop_listening(); }}); });