Fix comment copy logic
The addition of formatting in comments broke a variety of things having
to do with the copying logic. This change updates the logic and tests
to reflect the new DOM.
This issue arose because of a lack of integration tests for copying and
selection. That test is coming in a descendant change.
Bug: Issue 4969
Change-Id: I4e1994ab07947506c77b07877a46a9369d666d50
diff --git a/polygerrit-ui/app/elements/diff/gr-diff-view/gr-diff-view.js b/polygerrit-ui/app/elements/diff/gr-diff-view/gr-diff-view.js
index 1d63b47..f8f646a 100644
--- a/polygerrit-ui/app/elements/diff/gr-diff-view/gr-diff-view.js
+++ b/polygerrit-ui/app/elements/diff/gr-diff-view/gr-diff-view.js
@@ -241,6 +241,7 @@
_handleCKey: function(e) {
if (this.shouldSuppressKeyboardShortcut(e)) { return; }
if (this.$.diff.isRangeSelected()) { return; }
+ if (this.modifierPressed(e)) { return; }
e.preventDefault();
var line = this.$.cursor.getTargetLineElement();