mirror of
https://github.com/zulip/zulip.git
synced 2025-11-13 02:17:19 +00:00
Fix clicks not dismissing popovers (Trac #1435)
A cleaner, more general solution would be nice but this fixes at least the most obvious cases for now. (imported from commit fc7260e25a4f2172eee74af9c2d9384898947ad3)
This commit is contained in:
@@ -992,6 +992,7 @@ $(function () {
|
|||||||
respond_to_cursor = true;
|
respond_to_cursor = true;
|
||||||
respond_to_message({trigger: 'message click'});
|
respond_to_message({trigger: 'message click'});
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
|
popovers.hide_all();
|
||||||
}
|
}
|
||||||
mouse_moved = false;
|
mouse_moved = false;
|
||||||
clicking = false;
|
clicking = false;
|
||||||
@@ -1020,6 +1021,7 @@ $(function () {
|
|||||||
|
|
||||||
$("#main_div").on("click", ".star", function (e) {
|
$("#main_div").on("click", ".star", function (e) {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
|
popovers.hide_all();
|
||||||
toggle_star(rows.id($(this).closest(".message_row")));
|
toggle_star(rows.id($(this).closest(".message_row")));
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -1166,6 +1168,9 @@ $(function () {
|
|||||||
// composebox is open and you clicked out of it, you must want to
|
// composebox is open and you clicked out of it, you must want to
|
||||||
// stop composing!"
|
// stop composing!"
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
|
// Since we're stopping propagation we have to manually close any
|
||||||
|
// open popovers.
|
||||||
|
popovers.hide_all();
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#stream_filters li').on('click', 'a.subscription_name', function (e) {
|
$('#stream_filters li').on('click', 'a.subscription_name', function (e) {
|
||||||
@@ -1233,6 +1238,7 @@ $(function () {
|
|||||||
});
|
});
|
||||||
$('#feedback_button').click(function (e) {
|
$('#feedback_button').click(function (e) {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
|
popovers.hide_all();
|
||||||
compose.start('private', { 'private_message_recipient': 'feedback@humbughq.com',
|
compose.start('private', { 'private_message_recipient': 'feedback@humbughq.com',
|
||||||
trigger: 'feedback button' });
|
trigger: 'feedback button' });
|
||||||
|
|
||||||
@@ -1257,16 +1263,19 @@ $(function () {
|
|||||||
current_msg_list.table_name);
|
current_msg_list.table_name);
|
||||||
message_edit.start(row);
|
message_edit.start(row);
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
|
popovers.hide_all();
|
||||||
});
|
});
|
||||||
$("body").on("click", ".message_edit_save", function (e) {
|
$("body").on("click", ".message_edit_save", function (e) {
|
||||||
var row = $(this).closest(".message_row");
|
var row = $(this).closest(".message_row");
|
||||||
message_edit.save(row);
|
message_edit.save(row);
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
|
popovers.hide_all();
|
||||||
});
|
});
|
||||||
$("body").on("click", ".message_edit_cancel", function (e) {
|
$("body").on("click", ".message_edit_cancel", function (e) {
|
||||||
var row = $(this).closest(".message_row");
|
var row = $(this).closest(".message_row");
|
||||||
message_edit.end(row);
|
message_edit.end(row);
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
|
popovers.hide_all();
|
||||||
});
|
});
|
||||||
|
|
||||||
$("body").on('click', function (e) {
|
$("body").on('click', function (e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user