Bug 639969 - no context menus for content textareas [r=mbrubeck,wesj,a=approval2.0+]
authorVivien Nicolas <21@vingtetun.org>
Wed, 09 Mar 2011 03:33:34 +0100
changeset 67485 36113a4aaa3a20c87cad937b040c962340ebbfb5
parent 67484 a2628acfd43281613b18b81e792a3cec38c19881
child 67486 f1f39f899ed725887b5deda3068adc2213110502
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmbrubeck, wesj, approval2
bugs639969
Bug 639969 - no context menus for content textareas [r=mbrubeck,wesj,a=approval2.0+]
mobile/chrome/content/content.js
--- a/mobile/chrome/content/content.js
+++ b/mobile/chrome/content/content.js
@@ -836,17 +836,18 @@ var ContextHandler = {
             elem.getAttributeNS(kXLinkNamespace, "type") == "simple") {
 
           // Target is a link or a descendant of a link.
           state.types.push("link");
           state.label = state.linkURL = this._getLinkURL(elem);
           state.linkTitle = popupNode.textContent || popupNode.title;
           state.linkProtocol = this._getProtocol(this._getURI(state.linkURL));
           break;
-        } else if (elem instanceof Ci.nsIDOMHTMLInputElement && elem.type === "text") {
+        } else if ((elem instanceof Ci.nsIDOMHTMLInputElement &&
+                    elem.mozIsTextField(true)) || elem instanceof Ci.nsIDOMHTMLTextAreaElement) {
           let selectionStart = elem.selectionStart;
           let selectionEnd = elem.selectionEnd;
 
           state.types.push("input-text");
           if (selectionStart != selectionEnd) {
             state.types.push("copy");
             state.string = elem.value.slice(selectionStart, selectionEnd);
           } else if (elem.value) {