Make right-clicking anywhere on a message open the actions popover

(Except for links.)

(imported from commit 82ce229f3bbc647e9a35d93b063075fa68dbfe93)
This commit is contained in:
Keegan McAllister
2013-02-09 14:52:16 -05:00
parent 7fac4afbe7
commit f6cc8d3306

View File

@@ -808,6 +808,16 @@ $(function () {
show_actions_popover(this, rows.id(row)); show_actions_popover(this, rows.id(row));
}); });
$("#main_div").on("contextmenu", ".message_row, .recipient_row", function (e) {
// Let the browser handle right-click on links in messages;
// otherwise we take over
if ($(e.target).is('a'))
return;
e.preventDefault();
show_actions_popover(this, rows.id($(this)));
});
$("#home").on("click", ".narrows_by_recipient", function (e) { $("#home").on("click", ".narrows_by_recipient", function (e) {
var row = $(this).closest(".recipient_row"); var row = $(this).closest(".recipient_row");
narrow.target(rows.id(row)); narrow.target(rows.id(row));