Ticket #9129: 9129.patch

File 9129.patch, 1.2 KB (added by Garry Yao, 12 years ago)
  • _source/plugins/list/plugin.js

    IDEA additional info:
    Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
    <+>UTF-8
     
    972972                                                                joinNextLineToCursor( editor, cursor, range );
    973973                                                                evt.cancel();
    974974                                                        }
     975                                                        else
     976                                                        {
     977                                                                var list = path.contains( listNodeNames ), li;
     978
     979                                                                // Backspace pressed at the start of list. (#9129)
     980                                                                if ( list && range.checkBoundaryOfElement( list, CKEDITOR.START ) )
     981                                                                {
     982                                                                        li = path.contains( CKEDITOR.dtd.$listItem );
     983
     984                                                                        // Outdent if inside of empty list item.
     985                                                                        if ( range.checkBoundaryOfElement( li, CKEDITOR.START ) &&
     986                                                                             range.checkBoundaryOfElement( li, CKEDITOR.END ) )
     987                                                                        {
     988                                                                                editor.execCommand( 'outdent' );
     989                                                                                evt.cancel();
     990                                                                        }
     991                                                                        // Avoid destroying the list if it gets no contents before.
     992                                                                        else if ( !list.getPrevious( nonEmpty ) )
     993                                                                                evt.cancel();
     994                                                                }
     995                                                        }
    975996                                                }
    976997                                                else
    977998                                                {
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy