Changeset 6413


Ignore:
Timestamp:
02/09/2011 03:33:33 PM (4 years ago)
Author:
Saare
Message:

#7102: Divreplace sample sometimes does not work.

Location:
CKEditor/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • CKEditor/trunk/CHANGES.html

    r6410 r6413  
    4646        <ul> 
    4747                <li><a href="http://dev.ckeditor.com/ticket/7054">#7054</a> : Special characters' tooltips are now lowercased, making them more readable.</li> 
     48                <li><a href="http://dev.ckeditor.com/ticket/7102">#7102</a> : "Replacing Div" sample didn't work when double clicking inside of formatted text.</li> 
    4849                <li>Updated the following language files:<ul> 
    4950                        <li><a href="http://dev.ckeditor.com/ticket/7124">#7124</a> : Czech;</li> 
  • CKEditor/trunk/_samples/divreplace.html

    r6358 r6413  
    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} 
Note: See TracChangeset for help on using the changeset viewer.
© 2003 – 2012 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy