mleibman/SlickGrid — pull request #852 by Koloto (2014-01-09 10:30:27+00:00)
Title: handleKeyDown: return instantly if e.isImmediatePropagationStopped()

If user's `onKeyDown` event handler called `stopImmediatePropagation()`, the event is considered as handled and `preventDefault()` is called. But sometimes there are no need to call `preventDefault()`. For example I don't want to use TAB for the grid navigation (but I still want to use arrows). It's difficult to simulate TAB default behavior, so the best way is don't call `preventDefault()` at all. I suppose that `isImmediatePropagationStopped()` could be used as an flag to don't call `preventDefault()`. In this case I could lock TAB navigation by the following code:

grid.onKeyDown.subscribe(function (e) {
if (e.which === 9 && !e.ctrlKey && !e.metaKey) { // TAB
e.stopImmediatePropagation(); // e.preventDefault() will not be called
}
});

An user can always call `preventDefault()` in his own `onKeyDown` handler if this is necessary.