Element#down on an input element should not raise error.
This commit is contained in:
parent
b628c6de5c
commit
b4ea2abda1
|
@ -1,4 +1,4 @@
|
|||
* Avoid potential memory leaks in Firefox. (wpc, Tobie Langel) [#12 state:resolved]
|
||||
* Element#down on an input element should not raise error. (humeniuc, kangax)
|
||||
|
||||
* More unit tests for Object.isHash. (Tobie Langel)
|
||||
|
||||
|
|
|
@ -233,7 +233,7 @@ Element.Methods = {
|
|||
element = $(element);
|
||||
if (arguments.length == 1) return element.firstDescendant();
|
||||
return Object.isNumber(expression) ? element.descendants()[expression] :
|
||||
element.select(expression)[index || 0];
|
||||
Element.select(element, expression)[index || 0];
|
||||
},
|
||||
|
||||
previous: function(element, expression, index) {
|
||||
|
|
|
@ -561,6 +561,10 @@ new Test.Unit.Runner({
|
|||
var dummy = $(document.createElement('DIV'));
|
||||
dummy.innerHTML = '<div></div>'.times(3);
|
||||
this.assert(typeof dummy.down().setStyle == 'function');
|
||||
|
||||
var input = $$('input')[0];
|
||||
this.assertNothingRaised(function(){ input.down('span') });
|
||||
this.assertUndefined(input.down('span'));
|
||||
},
|
||||
|
||||
testElementPrevious: function() {
|
||||
|
|
Loading…
Reference in New Issue