Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/roundcube/roundcubemail.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/skins
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2019-07-17 20:03:22 +0300
committerAleksander Machniak <alec@alec.pl>2019-07-17 20:03:22 +0300
commitfbe36c7f5a3379a31b553e7c85a24e779440e9d3 (patch)
tree8da3fda1bbe04e37585ebad9569f57e4405400ad /skins
parent5baa8981eaace97dadc4705d2687630c33225a25 (diff)
Elastic: Fix bug where use of Tab key on autocomplete causes double insertion into a recipient input (#6850)
Diffstat (limited to 'skins')
-rw-r--r--skins/elastic/ui.js11
1 files changed, 4 insertions, 7 deletions
diff --git a/skins/elastic/ui.js b/skins/elastic/ui.js
index d29e30494..401d52b71 100644
--- a/skins/elastic/ui.js
+++ b/skins/elastic/ui.js
@@ -3109,13 +3109,9 @@ function rcube_elastic_ui()
insert_recipient(this.name, this.email);
});
- // setTimeout() here is needed for proper input reset on paste event
- // This is also the reason why we need parse_lock
- setTimeout(function() {
- input.val(result.text);
- apply_func();
- input_len_update();
- }, 1);
+ input.val(result.text);
+ apply_func();
+ input_len_update();
return result.recipients.length > 0;
},
@@ -3129,6 +3125,7 @@ function rcube_elastic_ui()
paste = (e.originalEvent.clipboardData || window.clipboardData).getData('text') || '';
// insert pasted text in place of the selection (or just cursor position)
value = value.substring(0, this.selectionStart) + paste + value.substring(this.selectionEnd);
+ e.preventDefault();
}
update_func(value);