Make Element.extend work on IE for Nodes with the same ID that where discarded.
This commit is contained in:
parent
d03e70c4d1
commit
e9501d63e5
@ -1,5 +1,7 @@
|
||||
*SVN*
|
||||
|
||||
* Make Element.extend work on IE for Nodes with the same ID that where discarded. [Mislav Marohnić, Thomas Fuchs]
|
||||
|
||||
* Make Selector correctly extend the first element it returns on IE. [Thomas Fuchs]
|
||||
|
||||
* Prevent a crash in Safari when using $A() on NodeList objects that contain text nodes. [Thomas Fuchs]
|
||||
|
@ -63,7 +63,7 @@ Element.extend = function(element) {
|
||||
element[property] = cache.findOrStore(value);
|
||||
}
|
||||
|
||||
element._extended = true;
|
||||
element._extended = Prototype.emptyFunction;
|
||||
return element;
|
||||
};
|
||||
|
||||
|
@ -153,6 +153,8 @@
|
||||
|
||||
<div id="element_extend_test"> </div>
|
||||
|
||||
<div id="element_reextend_test"><div id="discard_1"></div></div>
|
||||
|
||||
<div id="test_whitespace"> <span> </span>
|
||||
|
||||
|
||||
@ -607,6 +609,12 @@
|
||||
});
|
||||
}},
|
||||
|
||||
testElementExtendReextendsDiscardedNodes: function() {with(this) {
|
||||
assertRespondsTo('show', $('discard_1'));
|
||||
$('element_reextend_test').innerHTML += '<div id="discard_2"></div>';
|
||||
assertRespondsTo('show', $('discard_1'));
|
||||
}},
|
||||
|
||||
testElementCleanWhitespace: function() {with(this) {
|
||||
Element.cleanWhitespace("test_whitespace");
|
||||
assertEqual(3, $("test_whitespace").childNodes.length);
|
||||
|
Loading…
Reference in New Issue
Block a user