Bug 667438 - Choosing "Custom Page" option erases the text from the Start page button [r=mark.finkle]
authorLucas Rocha <lucasr@mozilla.com>
Fri, 12 Aug 2011 10:02:00 -0400
changeset 74356 27492e33ad0f4c1a1e070f7224dbe58e750c395e
parent 74355 56eaf58dc5fba57e88eb8991cafd1abb19ef17f3
child 74357 5ca0d6677b2c94da15a7e65d8824f586898d485b
push id2
push userbsmedberg@mozilla.com
push dateFri, 19 Aug 2011 14:38:13 +0000
reviewersmark
bugs667438
milestone8.0a1
Bug 667438 - Choosing "Custom Page" option erases the text from the Start page button [r=mark.finkle]
mobile/chrome/content/preferences.js
--- a/mobile/chrome/content/preferences.js
+++ b/mobile/chrome/content/preferences.js
@@ -250,16 +250,21 @@ var PreferencesView = {
         let currentURL = Browser.selectedBrowser.currentURI.spec;
         if (currentURL == "about:home") {
           value = "default";
         } else {
           url = currentURL;
           display = Browser.selectedBrowser.contentTitle || currentURL;
         }
         break;
+      case "custom":
+        // If value is custom, this means the user is trying to
+        // set homepage to the same custom value. Do nothing in
+        // this case.
+        return;
     }
 
     // Show or hide the title or URL of the custom homepage
     this._showHomePageHint(display);
 
     // Is the helper already in the list
     let helper = null;
     let items = options.menupopup.getElementsByAttribute("value", "custom");