to reproduce:
- press Ctrl-Shift-k to clear the buffer & scrollback
- run `printf '%s\n' {1..300}`
- use the left mouse to select 280
- while holding left mouse, select the content above
- while holding left mouse, use middle mouse to scroll back
- stop when you get back to 100 and let go of the left mouse
- look at the console and see the traceback:
Uncaught TypeError: Cannot read property 'rowIndex' of null
at hterm.Terminal.getSelectionText (nassh_deps.concat.js:15693)
at hterm.Terminal.copySelectionToClipboard (nassh_deps.concat.js:15703)
at hterm.Terminal.onMouse_ (nassh_deps.concat.js:15904)
nassh_deps.concat.js:15693:
hterm.Terminal.prototype.getSelectionText = function() {
...
var rv = this.getRowsText(selection.startRow.rowIndex, <-- 15693
selection.endRow.rowIndex + 1);
return lib.wc.substring(rv, startOffset, lib.wc.strWidth(rv) - endOffset);
nassh_deps.concat.js:15703:
hterm.Terminal.prototype.copySelectionToClipboard = function() {
var text = this.getSelectionText(); <-- 15703
if (text != null)
this.copyStringToClipboard(text);
};
nassh_deps.concat.js:15904:
hterm.Terminal.prototype.onMouse_ = function(e) {
...
if (e.type == 'mouseup' && e.button == 0 && this.copyOnSelect &&
!this.document_.getSelection().isCollapsed) {
this.copySelectionToClipboard(this.document_); <-- 15904
}
Comment 1 by vapier@chromium.org
, Dec 27