Return to normal mode after saving an inline comment

Prior to this, it would stay in visual mode, which was almost never
what the user wanted.

Change-Id: I7bd53200dc5d886d5ec7999784c82be809a900e9
This commit is contained in:
Dave Borowitz
2015-01-02 14:57:35 -08:00
committed by David Pursehouse
parent 56bf1cb803
commit 153597156f

View File

@@ -49,6 +49,8 @@ import com.google.gwt.user.client.ui.Widget;
import com.google.gwtexpui.globalkey.client.NpTextArea;
import com.google.gwtexpui.safehtml.client.SafeHtmlBuilder;
import net.codemirror.lib.CodeMirror;
/** An HtmlPanel for displaying and editing a draft */
class DraftBox extends CommentBox {
interface Binder extends UiBinder<HTMLPanel, DraftBox> {}
@@ -312,7 +314,9 @@ class DraftBox extends CommentBox {
} else {
CommentApi.updateDraft(psId, input.id(), input, group.add(cb));
}
getCm().focus();
CodeMirror cm = getCm();
cm.vim().handleKey("<Esc>");
cm.focus();
}
private void enableEdit(boolean on) {