Bug 900141 - Problems with new Context Menu Search, r=margaret
authorMark Capella <markcapella@twcny.rr.com>
Wed, 31 Jul 2013 18:25:37 -0400
changeset 153111 faeacb9338fc65bd8e349866116b6d0890fcc671
parent 153110 2809a0f567cac04b0cb70dd83071bd23fd53248f
child 153112 097a08472a11164e886941df6324feb952c079f0
push id2859
push userakeybl@mozilla.com
push dateMon, 16 Sep 2013 19:14:59 +0000
treeherdermozilla-beta@87d3c51cd2bf [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmargaret
bugs900141
milestone25.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 900141 - Problems with new Context Menu Search, r=margaret
mobile/android/chrome/content/SelectionHandler.js
mobile/android/chrome/content/browser.js
--- a/mobile/android/chrome/content/SelectionHandler.js
+++ b/mobile/android/chrome/content/SelectionHandler.js
@@ -392,17 +392,17 @@ var SelectionHandler = {
         type: "Share:Text",
         text: selectedText
       });
     }
     this._closeSelection();
   },
 
   searchSelection: function sh_searchSelection() {
-    let selectedText = this._getSelectedText();
+    let selectedText = this.getSelectedText();
     if (selectedText.length) {
       let req = Services.search.defaultEngine.getSubmission(selectedText);
       BrowserApp.selectOrOpenTab(req.uri.spec);
     }
     this._closeSelection();
   },
 
   /*
--- a/mobile/android/chrome/content/browser.js
+++ b/mobile/android/chrome/content/browser.js
@@ -5981,17 +5981,17 @@ var ClipboardHelper = {
     Services.obs.addObserver(this, "before-build-contextmenu", false);
   },
 
   uninit: function ch_uninit() {
     Services.obs.removeObserver(this, "before-build-contextmenu");
   },
 
   observe: function observe(aSubject, aTopic) {
-    if (aTopic == "ContextMenu:Open") {
+    if (aTopic == "before-build-contextmenu") {
       this._setSearchMenuItem();
     }
   },
 
   _setSearchMenuItem: function setSearchMenuItem() {
     if (this._searchMenuItem) {
       NativeWindow.contextmenus.remove(this._searchMenuItem);
     }