mirror of
https://github.com/zulip/zulip.git
synced 2026-07-15 21:03:26 +08:00
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:
parent
7a6068c3ad
commit
a15a1702e1
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user