hterm 1.29/nassh 0.8.25.3: Fix auto-copy.

The latest versions of Chrome prevent recursive calls to
document.execCommand.  We used to make a recursive call to cancel
the pending copy event and issue a new one after altering the
document selection.  That no longer seems to be necessary.

BUG=chromium:340699

Change-Id: Id56ad6cba32d8f95293af9e71f7696325272a4a6
Reviewed-on: https://chromium-review.googlesource.com/186418
Reviewed-by: Robert Ginda <rginda@chromium.org>
Tested-by: Robert Ginda <rginda@chromium.org>
diff --git a/hterm/doc/changelog.txt b/hterm/doc/changelog.txt
index c557a82..e6c3a6e 100644
--- a/hterm/doc/changelog.txt
+++ b/hterm/doc/changelog.txt
@@ -1,3 +1,18 @@
+1.29, 2014-02-14, Better recursive "copy" fix.
+
+* BUG=chromium:340699: Auto copy doesn't work.
+  AFAICT, the e.clipboardData.setData call wasn't actually doing anything.  The
+  scrollport's "select bags" we doing the right thing though, so we have that
+  going for us.  It's likely that the recursive "copy" was required in older
+  versions of Chrome, but it doesn't seem to be necessary anymore.
+* Fix the "Selection Copied" message from OSC 52 based copies.
+
+1.28, 2014-02-13, Fix recursive "copy".
+
+* BUG=chromium:340699: Auto copy doesn't work.
+  Use e.clipboardData.setData, rather than causing a recursive
+  document.execCommand("copy").
+
 1.27, 2014-01-28, Add fullwidth support.
 
 * Teaches hterm about the difference between halfwidth and fullwidth characters.
diff --git a/hterm/js/hterm_terminal.js b/hterm/js/hterm_terminal.js
index 2ac6eda..52af604 100644
--- a/hterm/js/hterm_terminal.js
+++ b/hterm/js/hterm_terminal.js
@@ -2408,10 +2408,8 @@
  * Note: If there is a selected range in the terminal, it'll be cleared.
  */
 hterm.Terminal.prototype.copyStringToClipboard = function(str) {
-  if (this.prefs_.get('enable-clipboard-notice'))
-    setTimeout(this.showOverlay.bind(this, hterm.notifyCopyMessage, 500), 200);
-
   var copySource = this.document_.createElement('pre');
+  copySource.addEventListener('copy', this.onCopy_.bind(this));
   copySource.textContent = str;
   copySource.style.cssText = (
       '-webkit-user-select: text;' +
@@ -2626,8 +2624,8 @@
  * React when the user tries to copy from the scrollPort.
  */
 hterm.Terminal.prototype.onCopy_ = function(e) {
-  e.preventDefault();
-  this.copySelectionToClipboard();
+  if (this.prefs_.get('enable-clipboard-notice'))
+    setTimeout(this.showOverlay.bind(this, hterm.notifyCopyMessage, 500), 200);
 };
 
 /**
diff --git a/nassh/doc/changelog.txt b/nassh/doc/changelog.txt
index 8fab846..6abc48e 100644
--- a/nassh/doc/changelog.txt
+++ b/nassh/doc/changelog.txt
@@ -1,3 +1,11 @@
+0.8.25.3, 2014-02-14, Update to hterm 1.29.
+
+* Update to hterm 1.29 for auto-copy fix-fix.
+
+0.8.25.2, 2014-02-13, Update to hterm 1.28.
+
+* Update to hterm 1.28 for auto-copy fix.
+
 0.8.25.1, 2014-01-28, Update to hterm 1.27.
 
 * Update to hterm 1.27 for fullwidth support.
diff --git a/nassh/manifest.json b/nassh/manifest.json
index 340e706..6b527eb 100644
--- a/nassh/manifest.json
+++ b/nassh/manifest.json
@@ -4,7 +4,7 @@
   "manifest_version": 2,
   "content_security_policy": "script-src 'self'; object-src 'self'",
   "name": "Secure Shell (tot)",
-  "version": "0.8.25.1",
+  "version": "0.8.25.3",
   "default_locale": "en",
   "icons": {
     "128": "images/dev/icon-128.png",