public
Fork of sstephenson/prototype
Description: Prototype JavaScript framework
Homepage: http://prototypejs.org/
Clone URL: git://github.com/jdalton/prototype.git
Search Repo:
Element#down on an input element should not raise error.

(cherry picked from commit a6d295dcab674c6565f295eb44ccbebbc8c14e2c)
Tue May 06 13:14:20 -0700 2008
commit  cdd8bbf7a7f8691ff740804d3f22c7243d6a7242
tree    f69cfac06c37e5e7d78d610cd3acdbe2e40ecd06
parent  bc60b6d207ef30201f34ae2716386602db4cc70a
...
 
 
 
 
1
2
3
...
1
2
3
4
5
6
7
0
@@ -1,3 +1,7 @@
0
+* Element#down on an input element should not raise error. (humeniuc, kangax)
0
+
0
+* Form#serializeElements should not serialize file inputs. (kangax, Lonesome Boy)
0
+
0
 * For consistency, add additional optional parameter "context" to Number.prototype.times. (samleb)
0
 
0
 * Fix Event#element accessing inexistent tagName property (e.g. when element is a document). (kangax)
...
233
234
235
236
 
237
238
239
...
233
234
235
 
236
237
238
239
0
@@ -233,7 +233,7 @@
0
     element = $(element);
0
     if (arguments.length == 1) return element.firstDescendant();
0
     return Object.isNumber(expression) ? element.descendants()[expression] :
0
- element.select(expression)[index || 0];
0
+ Element.select(element, expression)[index || 0];
0
   },
0
 
0
   previous: function(element, expression, index) {
...
561
562
563
 
 
 
 
564
565
566
...
561
562
563
564
565
566
567
568
569
570
0
@@ -561,6 +561,10 @@
0
     var dummy = $(document.createElement('DIV'));
0
     dummy.innerHTML = '<div></div>'.times(3);
0
     this.assert(typeof dummy.down().setStyle == 'function');
0
+
0
+ var input = $$('input')[0];
0
+ this.assertNothingRaised(function(){ input.down('span') });
0
+ this.assertUndefined(input.down('span'));
0
   },
0
   
0
   testElementPrevious: function() {

Comments

    No one has commented yet.