Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(222)

Unified Diff: chrome/browser/resources/settings/controls/settings_slider.js

Issue 2829663004: Fix MD display settings when the display supports a single resolution (Closed)
Patch Set: isNaN() only Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/settings/controls/settings_slider.js
diff --git a/chrome/browser/resources/settings/controls/settings_slider.js b/chrome/browser/resources/settings/controls/settings_slider.js
index c6b9b59e007198601fa4935a3b07ec8cdf929234..1d7e2a94372ca4f788a7972bb1dc37e8c08cf372 100644
--- a/chrome/browser/resources/settings/controls/settings_slider.js
+++ b/chrome/browser/resources/settings/controls/settings_slider.js
@@ -50,11 +50,15 @@ Polymer({
* @private
*/
onSliderChanged_: function() {
+ var sliderValue = isNaN(this.$.slider.immediateValue)
+ ? this.$.slider.value
+ : this.$.slider.immediateValue;
+
var newValue;
if (this.tickValues && this.tickValues.length > 0)
- newValue = this.tickValues[this.$.slider.immediateValue];
+ newValue = this.tickValues[sliderValue];
else
- newValue = this.$.slider.immediateValue;
+ newValue = sliderValue;
this.set('pref.value', newValue);
},
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698