Why not writing simply:
```js
                if (report && keyCode != domEvent.KC_TAB) {
                  // domEvent.KC_ESCAPE for issue#697 on FF
                  report.cancelKeyStroke = (keyCode == domEvent.KC_ESCAPE);
                 }
```