Skip to content

Commit

Permalink
hterm 1.58: copySelectionToClipboard fixes.
Browse files Browse the repository at this point in the history
* In hterm_terminal.js, use Terminal.prototype.copySelectionToClipboard, rather
  than the raw hterm.copySelectionToClipboard.

Change-Id: I3c63099cf6bb5fb9c6517d246cd4669ff8b0e8b8
Reviewed-on: https://chromium-review.googlesource.com/359606
Reviewed-by: Marius Schilder <[email protected]>
Tested-by: Rob Ginda <[email protected]>
  • Loading branch information
rginda committed Jul 12, 2016
1 parent bf85c3b commit 15ed490
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions hterm/doc/ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# 1.58, 2016-07-12, copySelectionToClipboard fixes.

* In hterm_terminal.js, use Terminal.prototype.copySelectionToClipboard, rather
than the raw hterm.copySelectionToClipboard.

# 1.57, 2016-04-06, A little polish.

* Fix race on IE with scrollport initialization.
Expand Down
6 changes: 3 additions & 3 deletions hterm/js/hterm_terminal.js
Original file line number Diff line number Diff line change
Expand Up @@ -2823,17 +2823,17 @@ hterm.Terminal.prototype.onMouse_ = function(e) {
}

if (!reportMouseEvents) {
if (e.type == 'dblclick') {
if (e.type == 'dblclick' && this.copyOnSelect) {
this.screen_.expandSelection(this.document_.getSelection());
hterm.copySelectionToClipboard(this.document_);
this.copySelectionToClipboard(this.document_);
}

if (e.type == 'mousedown' && e.which == this.mousePasteButton)
this.paste();

if (e.type == 'mouseup' && e.which == 1 && this.copyOnSelect &&
!this.document_.getSelection().isCollapsed) {
hterm.copySelectionToClipboard(this.document_);
this.copySelectionToClipboard(this.document_);
}

if ((e.type == 'mousemove' || e.type == 'mouseup') &&
Expand Down

0 comments on commit 15ed490

Please sign in to comment.