commit | fcbf21306f5364b32112710aaa54ef72b67386bf | [log] [tgz] |
---|---|---|
author | Jonathan Nieder <jrn@google.com> | Thu Apr 07 10:04:04 2016 -0700 |
committer | Jonathan Nieder <jrn@google.com> | Thu Apr 07 10:12:55 2016 -0700 |
tree | 6602b85ce9f03b856a18d113da8a97a9d7f0ae54 | |
parent | d7e4506aee9502d747279f5c4e7f33fda6c8640e [diff] |
Do not clobber selection within CloneRepo command If I carefully select a subset of the clone command (e.g., the Git URL), leave the selection alone instead of selecting the entire command on mouse up. Reported-by: Yuxuan 'fishy' Wang <fishywang@google.com> Change-Id: Iffc6532aa3c0ac27d1c320200170988d073867c1
diff --git a/gitiles-servlet/src/main/resources/com/google/gitiles/templates/RepositoryIndex.soy b/gitiles-servlet/src/main/resources/com/google/gitiles/templates/RepositoryIndex.soy index 19461bf..b4e7062 100644 --- a/gitiles-servlet/src/main/resources/com/google/gitiles/templates/RepositoryIndex.soy +++ b/gitiles-servlet/src/main/resources/com/google/gitiles/templates/RepositoryIndex.soy
@@ -65,7 +65,7 @@ <div class="CloneRepo"> <div class="CloneRepo-title">Clone this repo:</div> <input type="text" class="u-monospace CloneRepo-command" - onclick="this.focus();this.select();" + onclick="{literal}this.focus();if(this.selectionStart==this.selectionEnd){this.select()}{/literal}" readonly="readonly" value="git clone {$cloneUrl}"> </div>