Index: chrome/browser/resources/options/pref_ui.js |
diff --git a/chrome/browser/resources/options/pref_ui.js b/chrome/browser/resources/options/pref_ui.js |
index e825b689cec5fdb097af3c7801d09d1fb1df7b7e..f2b6a4c11c163d11bb080a28fbee427405cac248 100644 |
--- a/chrome/browser/resources/options/pref_ui.js |
+++ b/chrome/browser/resources/options/pref_ui.js |
@@ -42,7 +42,11 @@ cr.define('options', function() { |
///////////////////////////////////////////////////////////////////////////// |
// PrefInputElement class: |
- // Define a constructor that uses an input element as its underlying element. |
+ /** |
+ * Define a constructor that uses an input element as its underlying element. |
+ * @constructor |
+ * @extends {HTMLInputElement} |
+ */ |
var PrefInputElement = cr.ui.define('input'); |
PrefInputElement.prototype = { |
@@ -323,8 +327,11 @@ cr.define('options', function() { |
* @private |
*/ |
updatePrefFromState_: function() { |
- Preferences.setIntegerPref(this.pref, this.mapPositionToPref(this.value), |
- !this.dialogPref, this.metric); |
+ Preferences.setIntegerPref( |
+ this.pref, |
+ this.mapPositionToPref(parseInt(this.value, 10)), |
+ !this.dialogPref, |
+ this.metric); |
}, |
/** |
@@ -575,6 +582,7 @@ cr.define('options', function() { |
// Export |
return { |
PrefCheckbox: PrefCheckbox, |
+ PrefInputElement: PrefInputElement, |
PrefNumber: PrefNumber, |
PrefRadio: PrefRadio, |
PrefRange: PrefRange, |