Ticket #4208: 4208.patch

File 4208.patch, 1.7 KB (added by Sa'ar Zac Elias, 14 years ago)
  • _source/plugins/wysiwygarea/plugin.js

     
    684684                                                                        editor.fire( 'dataReady' );
    685685                                                                }, 0 );
    686686
    687                                                                 // IE, Opera and Safari may not support it and throw errors.
    688                                                                 try { editor.document.$.execCommand( 'enableObjectResizing', false, !editor.config.disableObjectResizing ) ; } catch(e) {}
    689                                                                 try { editor.document.$.execCommand( 'enableInlineTableEditing', false, !editor.config.disableNativeTableHandles ) ; } catch(e) {}
     687                                                                if ( editor.config.disableObjectResizing || editor.config.disableNativeTableHandles )
     688                                                                {
     689                                                                        // IE, Opera and Safari may not support it and throw errors.
     690                                                                        try {
     691                                                                                editor.document.$.execCommand( 'enableObjectResizing', false, !editor.config.disableObjectResizing );
     692                                                                                editor.document.$.execCommand( 'enableInlineTableEditing', false, !editor.config.disableNativeTableHandles );
     693                                                                        }
     694                                                                        catch( e )
     695                                                                        {
     696                                                                                // For browsers which don't support the above methods, we can use the the resize event or resizestart for IE (#4208)
     697                                                                                editor.document.getBody().on( CKEDITOR.env.ie ? 'resizestart' : 'resize', function( evt )
     698                                                                                {
     699                                                                                        if ( editor.config.disableObjectResizing || ( editor.getSelection().getSelectedElement().is( 'table' ) && editor.config.disableNativeTableHandles )  )
     700                                                                                                evt.data.preventDefault();
     701                                                                                });
     702                                                                        }
     703                                                                }
    690704
    691705                                                                /*
    692706                                                                 * IE BUG: IE might have rendered the iframe with invisible contents.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy