Skip to content

Commit

Permalink
Rebuild
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveSanderson committed Feb 8, 2012
1 parent 9f3125e commit 0b44229
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 42 deletions.
16 changes: 15 additions & 1 deletion build/output/knockout-latest.debug.js
Original file line number Diff line number Diff line change
Expand Up @@ -336,11 +336,22 @@ ko.utils = new (function () {
: element.textContent = value;

if (ieVersion >= 9) {
// Believe it or not, this actually fixes an IE9 rendering bug. Insane. https://github.com/SteveSanderson/knockout/issues/209
// Believe it or not, this actually fixes an IE9 rendering bug
// (See https://github.com/SteveSanderson/knockout/issues/209)
element.style.display = element.style.display;
}
},

ensureSelectElementIsRenderedCorrectly: function(selectElement) {
// Workaround for IE9 rendering bug - it doesn't reliably display all the text in dynamically-added select boxes unless you force it to re-render by updating the width.
// (See https://github.com/SteveSanderson/knockout/issues/312, http://stackoverflow.com/questions/5908494/select-only-shows-first-char-of-selected-option)
if (ieVersion >= 9) {
var originalWidth = selectElement.style.width;
selectElement.style.width = 0;
selectElement.style.width = originalWidth;
}
},

range: function (min, max) {
min = ko.utils.unwrapObservable(min);
max = ko.utils.unwrapObservable(max);
Expand Down Expand Up @@ -2251,6 +2262,9 @@ ko.bindingHandlers['options'] = {
// the dropdown selection state is meaningless, so we preserve the model value.
ensureDropdownSelectionIsConsistentWithModelValue(element, ko.utils.unwrapObservable(allBindings['value']), /* preferModelValue */ true);
}

// Workaround for IE9 bug
ko.utils.ensureSelectElementIsRenderedCorrectly(element);
}
}
};
Expand Down
Loading

0 comments on commit 0b44229

Please sign in to comment.