Ticket #3305: 3305.patch

File 3305.patch, 801 bytes (added by Frederico Caldeira Knabben, 14 years ago)
  • _source/plugins/selection/plugin.js

     
    259259         */
    260260        CKEDITOR.dom.document.prototype.getSelection = function()
    261261        {
    262                 return new CKEDITOR.dom.selection( this );
     262                var sel = new CKEDITOR.dom.selection( this );
     263                return ( !sel || sel.isInvalid ) ? null : sel;
    263264        };
    264265
    265266        /**
     
    319320                                || ( range.item && range.item(0).ownerDocument != this.document.$ )
    320321                                || ( range.parentElement && range.parentElement().ownerDocument != this.document.$ ) )
    321322                        {
    322                                 return null;
     323                                this.isInvalid = true;
    323324                        }
    324325                }
    325                
    326                 return this;
    327326        };
    328327
    329328        var styleObjectElements =
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy