search: Only highlight actual message or recipient header text

Before, a whitespace-only search would "highlight" the pointer and all kinds of
other interstitial space, which totally broke the page layout.

Fixes #408.

(imported from commit e7e0e251551a9da5a2ea53e36b9cce16e3e30634)
This commit is contained in:
Keegan McAllister 2013-01-15 16:26:36 -05:00
parent 7a6068c3ad
commit a15a1702e1

View File

@ -328,11 +328,11 @@ function search(term, highlighted_message, reverse) {
function highlight_match(row, search_term) {
$('table tr').removeHighlight();
row.highlight(search_term);
row.find('.message_content').highlight(search_term);
row = row.prev('.recipient_row');
if ((row.length !== 0) && (match_on_visible_text(row, search_term))) {
row.highlight(search_term);
row.find('.message_label_clickable').highlight(search_term);
}
}