Defer to default copy implementation when text is selected

Closes gh-1316
This commit is contained in:
Thomas Kluyver 2016-04-07 11:16:56 -07:00
parent b4a5523ab6
commit 5998678d08

View File

@ -33,7 +33,9 @@ function load_json(clipboard) {
}
function copy(event) {
if (Jupyter.notebook.mode !== 'command') {
if ((Jupyter.notebook.mode !== 'command') ||
// window.getSelection checks if text is selected, e.g. in output
!window.getSelection().isCollapsed) {
return;
}
var selecn = Jupyter.notebook.get_selected_cells().map(