From ff222c1cf2396af0a10c61983dff9c339b6569d0 Mon Sep 17 00:00:00 2001 From: Wesley Moore Date: Fri, 9 Jul 2010 08:23:59 +1000 Subject: [PATCH] Make search work in Safari again --- output/js/application.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/output/js/application.js b/output/js/application.js index 11774a3..f92a143 100644 --- a/output/js/application.js +++ b/output/js/application.js @@ -10,7 +10,7 @@ jQuery(function() { } function refresh_search(elem) { - var input = elem || $(this); // Pass a jQuery object or use this + var input = $(elem); var value = input.val() || ""; var q = value.toLowerCase(); @@ -33,7 +33,7 @@ jQuery(function() { if(input.get(0).hasOwnProperty('onsearch')) { console.log("Using search event for search"); $('#search label').hide(); - input.bind("search", refresh_search); + input.bind("search", function() { refresh_search(this) }); } else { // Poll the field for its value while it has focus