diff --git a/plugins/enigma/enigma.js b/plugins/enigma/enigma.js index fe2a599f5..94bcb2a0d 100644 --- a/plugins/enigma/enigma.js +++ b/plugins/enigma/enigma.js @@ -59,7 +59,7 @@ window.rcmail && rcmail.addEventListener('init', function(evt) { e.stopPropagation(); }); - $('a.button.enigma').prop('tabindex', $('#messagetoolbar > a:first').prop('tabindex')); + $('a.button.enigma').prop('tabindex', $('#messagetoolbar > a').first().prop('tabindex')); $.each(['encrypt', 'sign'], function() { var opt = this, input = $('#enigma' + opt + 'opt'); diff --git a/plugins/managesieve/managesieve.js b/plugins/managesieve/managesieve.js index 6afc25409..f81f78a41 100644 --- a/plugins/managesieve/managesieve.js +++ b/plugins/managesieve/managesieve.js @@ -980,7 +980,7 @@ function sieve_form_init() parent.rcmail.managesieve_dialog_resize(form); } - $('input[type="text"]:first', form).focus(); + $('input[type="text"]', form).first().focus(); // initialize smart list inputs $('textarea[data-type="list"]', form).each(function() { @@ -1189,7 +1189,7 @@ rcube_webmail.prototype.managesieve_dialog_resize = function(o) { var dialog = this.env.managesieve_dialog, win = $(window), form = $(o); - width = $('fieldset:first', o).width(), // fieldset width is more appropriate here + width = $('fieldset', o).first().width(), // fieldset width is more appropriate here height = form.height(), w = win.width(), h = win.height(); diff --git a/plugins/password/password.js b/plugins/password/password.js index f5080e9af..78389f088 100644 --- a/plugins/password/password.js +++ b/plugins/password/password.js @@ -58,5 +58,5 @@ window.rcmail && rcmail.addEventListener('init', function(evt) { } }, true); - $('input:not(:hidden):first').focus(); + $('input:not(:hidden)').first().focus(); }); diff --git a/program/js/app.js b/program/js/app.js index 7cb799636..7c12fe461 100644 --- a/program/js/app.js +++ b/program/js/app.js @@ -2967,7 +2967,7 @@ function rcube_webmail() r.parent_uid = 0; if (r.has_children) { // replace 'leaf' with 'collapsed' - $('#'+r.id+' .leaf:first') + $('#' + r.id + ' .leaf').first() .attr('id', 'rcmexpando' + r.id) .attr('class', (r.obj.style.display != 'none' ? 'expanded' : 'collapsed')) .mousedown({uid: r.uid}, function(e) { @@ -4327,7 +4327,7 @@ function rcube_webmail() }); content = $('