Bug 1556203 - Follow-up: Attach contextmenu listener to input area, not entire conversation. r=me DONTBUILD
authorJorg K <jorgk@jorgk.com>
Tue, 18 Jun 2019 01:33:43 +0200
changeset 35888 89ab13bca091925ab2e05e0b8c9c15be053b86ed
parent 35887 ef63fe1ce237872810ca5209db1a1f5d55cb6ea7
child 35889 f6ecf44bd9bef23513a7a4e473dc021b44269da1
push id392
push userclokep@gmail.com
push dateMon, 02 Sep 2019 20:17:19 +0000
reviewersme
bugs1556203
Bug 1556203 - Follow-up: Attach contextmenu listener to input area, not entire conversation. r=me DONTBUILD
mail/components/im/content/chat-messenger.js
--- a/mail/components/im/content/chat-messenger.js
+++ b/mail/components/im/content/chat-messenger.js
@@ -737,17 +737,17 @@ var chatHandler = {
         convDeck.appendChild(conv);
         conv.conv = item.conv;
         conv.tab = item;
         conv.setAttribute("contentcontextmenu", "chatConversationContextMenu");
         conv.setAttribute("contenttooltip", "imTooltip");
         item.convView = conv;
         document.getElementById("contextSplitter").hidden = false;
         document.getElementById("contextPane").hidden = false;
-        conv.addEventListener("contextmenu", (e) => {
+        conv.editor.addEventListener("contextmenu", (e) => {
           // Stash away the original event's parent and range for later use.
           gRangeParent = e.rangeParent;
           gRangeOffset = e.rangeOffset;
           let popup = document.getElementById("chatContextMenu");
           popup.openPopupAtScreen(e.screenX, e.screenY, true);
           e.preventDefault();
         });