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

Ticket #10626: visible_patch.diff

File visible_patch.diff, 490 bytes (added by kangax, 8 months ago)
  • src/dom.js

    old new  
    6363 
    6464Element.Methods = { 
    6565  visible: function(element) { 
    66     return $(element).style.display != 'none'; 
     66    element = $(element); 
     67    do if (element.nodeType == 1 && element.style.display === 'none')  
     68      return false; 
     69    while (element = element.parentNode) 
     70    return true; 
    6771  }, 
    6872   
    6973  toggle: function(element) {