Index: chrome/browser/resources/options/browser_options.js |
diff --git a/chrome/browser/resources/options/browser_options.js b/chrome/browser/resources/options/browser_options.js |
index 22a45952e94ed15d4f6c1d837e2b3eb39961da8a..de335b02307dc66880b9b0e3947337fedf6815a8 100644 |
--- a/chrome/browser/resources/options/browser_options.js |
+++ b/chrome/browser/resources/options/browser_options.js |
@@ -69,8 +69,8 @@ cr.define('options', function() { |
this.handleHomepageUseNTPButtonChange_.bind(this); |
$('homepageUseURLButton').onchange = |
this.handleHomepageUseURLButtonChange_.bind(this); |
- homepageField.onchange = |
- this.handleHomepageURLChange_.bind(this); |
+ homepageField.onchange = this.handleHomepageURLChange_.bind(this); |
+ homepageField.oninput = this.handleHomepageURLChange_.bind(this); |
// Ensure that changes are committed when closing the page. |
window.addEventListener('unload', function() { |
@@ -203,12 +203,13 @@ cr.define('options', function() { |
}, |
/** |
- * Handles change events of the text field 'homepageURL'. |
+ * Handles input and change events of the text field 'homepageURL'. |
* @private |
- * @param {event} change event. |
+ * @param {event} input/change event. |
*/ |
handleHomepageURLChange_: function(event) { |
- Preferences.setStringPref('homepage', $('homepageURL').value); |
+ var doFixup = event.type == 'change' ? '1' : '0'; |
+ chrome.send('setHomePage', [$('homepageURL').value, doFixup]); |
}, |
/** |