From 82d6039fdced8584e56bb8a700dda722083cc2d3 Mon Sep 17 00:00:00 2001 From: Luke Faraone Date: Wed, 6 Mar 2013 11:11:20 -0500 Subject: [PATCH] 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) --- zephyr/static/js/compose.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zephyr/static/js/compose.js b/zephyr/static/js/compose.js index c6a4d24235..fae58a1d01 100644 --- a/zephyr/static/js/compose.js +++ b/zephyr/static/js/compose.js @@ -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();