Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #11102: down_select_patch_test.diff

File down_select_patch_test.diff, 1.0 kB (added by kangax, 6 months ago)
  • test/unit/dom.html

    old new  
    965965      var dummy = $(document.createElement('DIV')); 
    966966      dummy.innerHTML = '<div></div>'.times(3); 
    967967      this.assert(typeof dummy.down().setStyle == 'function'); 
     968       
     969      var _input = $$('input')[0]; 
     970      this.assertNothingRaised(function(){ _input.down('span'); }) 
     971      this.assertUndefined(_input.down('span')); 
    968972    }, 
    969973     
    970974    testElementPrevious: function() { 
  • src/dom.js

    old new  
    233233    element = $(element); 
    234234    if (arguments.length == 1) return element.firstDescendant(); 
    235235    return Object.isNumber(expression) ? element.descendants()[expression] : 
    236       element.select(expression)[index || 0]; 
     236      Element.select(element, expression)[index || 0]; 
    237237  }, 
    238238 
    239239  previous: function(element, expression, index) {