Fix keyboard shortcuts under Chrome/Safari

Pressing 'c' to open a comment editor on the current line also
put a 'c' in the editor's text box.  This was fixed by adding a
preventDefault() during dispatch inside of GlobalKey and is picked
up by upgrading to a newer gwtexpui.

Ctrl-S and Ctrl-D were performing the default browser actions to
save the current page and bookmark the current page.  The issue
here was WebKit doesn't support the keypress handler in a text box.
Instead we have to use keydown handlers to capture the event.

Just switching to the keydown handler however caused focus to be
lost on the table when the editor closed, because Chrome doesn't know
where to send focus when the currently focused widget is destroyed.
Adding in explicit blur() requests through setFocus(false)
immediately before we make the text area not visible, read-only,
or deleted from the DOM allows the global keys to work as expected
after the current event is done.

Bug: issue 431
Bug: issue 639
Change-Id: I08732be288f1149073d85bc5e09ab4cfb6547f8f
Signed-off-by: Shawn O. Pearce <sop@google.com>
5 files changed