Permalink
Browse files

Bump version to 2.1.0rc2 and rebuild

  • Loading branch information...
1 parent 76bb0b1 commit bbc3b9ad8f083b336ba86123e2cad37818897e11 @SteveSanderson SteveSanderson committed Apr 25, 2012
Showing with 75 additions and 73 deletions.
  1. +1 −1 build/fragments/version.txt
  2. +10 −8 build/output/knockout-latest.debug.js
  3. +64 −64 build/output/knockout-latest.js
@@ -1 +1 @@
-2.1.0rc
+2.1.0rc2
@@ -1,4 +1,4 @@
-// Knockout JavaScript library v2.1.0rc
+// Knockout JavaScript library v2.1.0rc2
// (c) Steven Sanderson - http://knockoutjs.com/
// License: MIT (http://www.opensource.org/licenses/mit-license.php)
@@ -36,7 +36,7 @@ ko.exportSymbol = function(koPath, object) {
ko.exportProperty = function(owner, publicName, object) {
owner[publicName] = object;
};
-ko.version = "2.1.0rc";
+ko.version = "2.1.0rc2";
ko.exportSymbol('version', ko.version);
ko.utils = new (function () {
@@ -54,6 +54,7 @@ ko.utils = new (function () {
knownEventTypesByEventName[knownEventsForType[i]] = eventType;
}
}
+ var eventsThatMustBeRegisteredUsingAttachEvent = { 'propertychange': true }; // Workaround for an IE9 issue - https://github.com/SteveSanderson/knockout/issues/406
// Detect IE versions for bug workarounds (uses IE conditionals, not UA string, for robustness)
var ieVersion = (function() {
@@ -257,7 +258,8 @@ ko.utils = new (function () {
},
registerEventHandler: function (element, eventType, handler) {
- if (typeof jQuery != "undefined") {
+ var mustUseAttachEvent = ieVersion && eventsThatMustBeRegisteredUsingAttachEvent[eventType];
+ if (!mustUseAttachEvent && typeof jQuery != "undefined") {
if (isClickOnCheckableElement(element, eventType)) {
// For click events on checkboxes, jQuery interferes with the event handling in an awkward way:
// it toggles the element checked state *after* the click event handlers run, whereas native
@@ -273,7 +275,7 @@ ko.utils = new (function () {
};
}
jQuery(element)['bind'](eventType, handler);
- } else if (typeof element.addEventListener == "function")
+ } else if (!mustUseAttachEvent && typeof element.addEventListener == "function")
element.addEventListener(eventType, handler, false);
else if (typeof element.attachEvent != "undefined")
element.attachEvent("on" + eventType, function (event) {
@@ -3320,10 +3322,10 @@ ko.exportSymbol('utils.compareArrays', ko.utils.compareArrays);
}
}
if (!invokedBeforeRemoveCallback && nodesToDelete.length) {
- var commonParent = nodesToDelete[0].element.parentNode;
- if (commonParent) {
- for (var i = 0; i < nodesToDelete.length; i++)
- commonParent.removeChild(nodesToDelete[i].element);
+ for (var i = 0; i < nodesToDelete.length; i++) {
+ var element = nodesToDelete[i].element;
+ if (element.parentNode)
+ element.parentNode.removeChild(element);
}
}
Oops, something went wrong.

0 comments on commit bbc3b9a

Please sign in to comment.