Don't open compose when clicking links containing search terms.

Link that is a search term opens compose box, add this exception to
the is_clickable_message_element.

Fixes: #4651.
This commit is contained in:
Mahim Goyal 2017-05-08 23:30:28 +05:30 committed by Tim Abbott
parent abd09cebb2
commit a44a291cdf

View File

@ -57,7 +57,8 @@ $(function () {
function is_clickable_message_element(target) {
return target.is("a") || target.is("img.message_inline_image") || target.is("img.twitter-avatar") ||
target.is("div.message_length_controller") || target.is("textarea") || target.is("input") ||
target.is("i.edit_content_button");
target.is("i.edit_content_button") ||
(target.is(".highlight") && target.parent().is("a"));
}
$("#main_div").on("click", ".messagebox", function (e) {