mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-13 04:28:41 -09:00
dblClick test nodeName (#641)
This commit is contained in:
parent
7fbd8ccaf1
commit
3a9447185f
1 changed files with 6 additions and 1 deletions
|
|
@ -6,7 +6,12 @@ exports.clear = function (terminal) {
|
|||
|
||||
// Use selection extend upon dblclick
|
||||
exports.extend = function (terminal) {
|
||||
terminal.screen_.expandSelection(terminal.document_.getSelection());
|
||||
let sel = terminal.document_.getSelection();
|
||||
|
||||
// Test if focusNode exist and nodeName is #text
|
||||
if (sel.focusNode && sel.focusNode.nodeName === '#text') {
|
||||
terminal.screen_.expandSelection(sel);
|
||||
}
|
||||
};
|
||||
|
||||
// Fix a bug in ScrollPort selectAll behavior
|
||||
|
|
|
|||
Loading…
Reference in a new issue