Disable key bindings when typing in a contentEditable element.

Review Request #8931 — Created May 8, 2017 and submitted

Christian Hammond
Review Board
Our CodeMirror widget defaults to using the browser's contentEditable
support when on a mobile device, instead of handling its own version of
focus and key events. This allows key events to bubble up, eventually
being captured by the diff viewer's key bindings support, creating a
pretty terrible experience as the page begins to jump around or delete
your comment in reaction to the keys being pressed.

Just like we ignore text areas and input fields, we now ignore elements
that have contentEditable set, preventing key bindings from being

Added some logging to the key bindings code and verified that they
weren't being handled when typing in the comment dialog. I no longer got
the page jumps or other weird behavior when typing on an iPad.

David Trowbridge
  1. Ship It!
Christian Hammond
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-2.5.x (1a801b3)