Skip to content

Commit

Permalink
Only hold Shift down at start of text copy.
Browse files Browse the repository at this point in the history
  • Loading branch information
jzohrab committed Nov 1, 2024
1 parent 9a9179d commit 85ad4e5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lute/static/js/lute.js
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,7 @@ let word_clicked = function(el, e) {
/** Multiword selection */

let selection_start_el = null;
let selection_start_shift_held = false;

let clear_newmultiterm_elements = function() {
$('.newmultiterm').removeClass('newmultiterm');
Expand All @@ -332,6 +333,7 @@ function select_started(el, e) {
clear_newmultiterm_elements();
el.addClass('newmultiterm');
selection_start_el = el;
selection_start_shift_held = e.shiftKey;
save_curr_data_order(el);
}

Expand Down Expand Up @@ -374,14 +376,15 @@ function select_ended(el, e) {
$('span.kwordmarked').removeClass('kwordmarked');

const selected = get_selected_in_range(selection_start_el, el);
if (e.shiftKey) {
if (selection_start_shift_held) {
copy_text_to_clipboard(selected.toArray());
start_hover_mode(false);
return;
}

show_multiword_term_edit_form(selected);
selection_start_el = null;
selection_start_shift_held = false;
}


Expand Down

0 comments on commit 85ad4e5

Please sign in to comment.