Elastic: Fix blur and mouse selection on the recipient-input

pull/6495/head
Aleksander Machniak 6 years ago
parent c93d11b473
commit 2940e2f948

@ -2925,8 +2925,6 @@ function rcube_elastic_ui()
},
focus_func = function() {
list.addClass('focus');
// move cursor to the end of input text, use setTimeout for Firefox
setTimeout(function() { rcmail.set_caret_pos(input.get(0), input.val().length); }, 1);
},
insert_recipient = function(name, email, replace) {
var recipient = $('<li class="recipient">'),
@ -2983,6 +2981,10 @@ function rcube_elastic_ui()
return result.recipients.length > 0;
},
parse_func = function(e) {
if (e.type == 'blur') {
list.removeClass('focus');
}
// FIXME: This is a workaround for a bug where on a touch device
// selecting a recipient from autocomplete list do not work because
// of some events race condition (?)
@ -2990,10 +2992,6 @@ function rcube_elastic_ui()
return;
}
if (e.type == 'blur') {
list.removeClass('focus');
}
// On paste the text is not yet in the input we have to use clipboard.
// Also because on paste new-line characters are replaced by spaces (#6460)
update_func(e.type == 'paste' ? (e.originalEvent.clipboardData || window.clipboardData).getData('text') : null);

Loading…
Cancel
Save