diff --git a/CHANGELOG b/CHANGELOG index dd80ab9..580f1f4 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,7 @@ *SVN* +* Fix readAttribute-related failure in form.html in IE. [sam, Andrew Dupont] + * Fix failing dom.html and selector.html tests in IE. [Tobie Langel, Andrew Dupont] * Make sure the WebKit redefinition of Element#cumulativeOffset uses Element._returnOffset. Closes #9245. [mdaines] diff --git a/src/dom.js b/src/dom.js index b335a8f..e6ad889 100644 --- a/src/dom.js +++ b/src/dom.js @@ -799,6 +799,10 @@ else if (Prototype.Browser.IE) { _getAttr: function(element, attribute) { return element.getAttribute(attribute, 2); }, + _getAttrNode: function(element, attribute) { + var node = element.getAttributeNode(attribute); + return node ? node.value : ""; + }, _getEv: function(element, attribute) { var attribute = element.getAttribute(attribute); return attribute ? attribute.toString().slice(23, -2) : null; @@ -839,13 +843,14 @@ else if (Prototype.Browser.IE) { (function(v) { Object.extend(v, { - href: v._getAttr, - src: v._getAttr, - type: v._getAttr, - disabled: v._flag, - checked: v._flag, - readonly: v._flag, - multiple: v._flag, + href: v._getAttr, + src: v._getAttr, + type: v._getAttr, + action: v._getAttrNode, + disabled: v._flag, + checked: v._flag, + readonly: v._flag, + multiple: v._flag, onload: v._getEv, onunload: v._getEv, onclick: v._getEv,