Correct selector to apply to the descendants of .message_comp.

Previously we did the equivalent of a $('.message_comp').child('input'),
which does not search beyond the first level.

In addition, using a comma in a selector is essentially an AND, which
means the narrow search only applied to elements of the 'input' class.
So when debugging we saw a bunch of elements being selected and that hid
the bug for a bit.

Now we do a .find instead which will ensure we blur the correct
elements.

This closes trac #1045.

(imported from commit f44383ee9fc93406d031589ef914f5a003334ea7)
This commit is contained in:
Luke Faraone
2013-03-06 11:11:20 -05:00
parent c39aa0b0bc
commit 82d6039fdc

View File

@@ -279,7 +279,7 @@ $(function () {
});
exports.hide = function () {
$('.message_comp > input, textarea, button').blur();
$('.message_comp').find('input, textarea, button').blur();
$('.message_comp').slideUp(100,
function() { $('#compose').css({visibility: "hidden"});});
notifications_bar.enable();