Ticket #7102: 7102.patch

File 7102.patch, 782 bytes (added by Sa'ar Zac Elias, 12 years ago)
  • _samples/divreplace.html

     
    5252        var element = ev.target || ev.srcElement;
    5353
    5454        // Find out the div that holds this element.
    55         element = element.parentNode;
     55        var name;
     56        do
     57        {
     58                element = element.parentNode;
     59        }
     60        while ( element && ( name = element.nodeName.toLowerCase() ) && ( name != 'div' || element.className.indexOf( 'editable' ) == -1 ) && name != 'body' )
     61       
    5662
    57         if ( element.nodeName.toLowerCase() == 'div'
    58                  && ( element.className.indexOf( 'editable' ) != -1 ) )
     63        if ( name == 'div' && element.className.indexOf( 'editable' ) != -1 )
    5964                replaceDiv( element );
    6065}
    6166
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy