Bug 1129401 - Can't copy URL by right clicking it the first time. r=Mossop, a=sledru
authorFlorian Quèze <florian@queze.net>
Wed, 11 Feb 2015 20:47:27 +0100
changeset 243771 58fa5b70d329
parent 243770 694d627b4786
child 243772 5d83c055e2a9
push id4470
push userryanvm@gmail.com
push date2015-02-13 20:35 +0000
treeherdermozilla-beta@5d83c055e2a9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersMossop, sledru
bugs1129401
milestone36.0
Bug 1129401 - Can't copy URL by right clicking it the first time. r=Mossop, a=sledru
toolkit/content/widgets/textbox.xml
--- a/toolkit/content/widgets/textbox.xml
+++ b/toolkit/content/widgets/textbox.xml
@@ -236,19 +236,20 @@
           }
         ]]>
       </handler>
 
       <handler event="click" action="this._maybeSelectAll();"/>
 
 #ifndef XP_WIN
       <handler event="contextmenu">
-        // Only care about context clicks on the input field itself
-        if (event.target != this.inputField)
+        // Only care about context clicks on the textbox itself.
+        if (event.target != this)
           return;
+
         if (!event.button) // context menu opened via keyboard shortcut
           return;
         this._maybeSelectAll();
         // see bug 576135 comment 4
         let box = this.inputField.parentNode;
         let menu = document.getAnonymousElementByAttribute(box, "anonid", "input-box-contextmenu");
         box._doPopupItemEnabling(menu);
       </handler>