From 527200c83d139f25f7cc5f174e468c75f0e0a400 Mon Sep 17 00:00:00 2001 From: Shawn Pearce Date: Mon, 27 Jan 2014 18:40:17 -0800 Subject: [PATCH] SideBySide2: Fix copy in Firefox and Safari Ctrl-C/Cmd-C should be copy to clipboard and should not activate the insert new comment feature of Gerrit. Bind to the C key not 'c'. This uses a different binding method inside of CM3 allowing the browser to still handle Ctrl-C/Cmd-C. Bug: issue 2416 Change-Id: Iad6d4e8502c1766caf1cc897f1398068bbde7155 --- .../com/google/gerrit/client/diff/SideBySide2.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/gerrit-gwtui/src/main/java/com/google/gerrit/client/diff/SideBySide2.java b/gerrit-gwtui/src/main/java/com/google/gerrit/client/diff/SideBySide2.java index 0a8f0e4841..4de02b05f8 100644 --- a/gerrit-gwtui/src/main/java/com/google/gerrit/client/diff/SideBySide2.java +++ b/gerrit-gwtui/src/main/java/com/google/gerrit/client/diff/SideBySide2.java @@ -288,12 +288,12 @@ public class SideBySide2 extends Screen { } }); cm.addKeyMap(KeyMap.create() - .on("'a'", upToChange(true)) - .on("'u'", upToChange(false)) - .on("'r'", toggleReviewed()) - .on("'o'", toggleOpenBox(cm)) + .on("A", upToChange(true)) + .on("U", upToChange(false)) + .on("R", toggleReviewed()) + .on("O", toggleOpenBox(cm)) .on("Enter", toggleOpenBox(cm)) - .on("'c'", insertNewDraft(cm)) + .on("C", insertNewDraft(cm)) .on("Alt-U", new Runnable() { public void run() { cm.getInputField().blur();