Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#14583 closed Bug (duplicate)

Remove Resize Handler from IE9

Reported by: nizamtk Owned by:
Priority: Normal Milestone:
Component: General Version:
Keywords: Cc:

Description

Expected result

The CKEditor is working fine in all browsers except IE11. Need to fix it in IE1 too. I have found some solutions for this in online(http://stackoverflow.com/questions/21864047/ie-how-to-disable-elements-selection-and-resizing-in-contenteditable-div), but I'm still not able to fix it. It will be great if you could help me in this asap.

Actual result

Resize Handler is showing in IE11 when trying to add texts in the editor.

Change History (5)

comment:1 Changed 4 years ago by Jakub Ś

Resolution: duplicate
Status: newclosed
Version: 4.5.9 (GitHub - master)

Please see: https://dev.ckeditor.com/ticket/12161

Something like below might help but this is a hack and this is a best you can do in IE11

var editor = CKEDITOR.replace( 'editor1', {});	
 editor.on( 'pluginsLoaded', function( evt ){
                editor.on( 'contentDom', function( e ){
                    var editable = editor.editable(),
                        element = editable.$;

                    if ( element.addEventListener ) {
                        // IE up to 10.
                        element.addEventListener( 'mscontrolselect', function( evt ) {
                            evt.preventDefault();
                        } );
                    } else {
                        // IE11 and higher.
                        element.attachEvent( 'oncontrolselect', function( evt ) {
                            evt.returnValue = false;
                        } );
                    }
                });   
            });
Last edited 4 years ago by Jakub Ś (previous) (diff)

comment:2 Changed 4 years ago by nizamtk

Can you please advice in which file I need to update above code.

comment:3 Changed 4 years ago by Jakub Ś

Thee code from comment:1 can be used on HTML page directy. Please see the updated version.

comment:4 Changed 4 years ago by nizamtk

My website is a wordpress. I have placed provided code in my website, http://chiropractic.creativriderz.com/

Still issue not fixed. I have placed code either in top and bottom of form. But no hope.

Please follow below URL to test, http://chiropractic.creativriderz.com/form-reg/

Please use below given login credential,

http://chiropractic.creativriderz.com/login-3/

Email: testtest@… Password: testtest

Looking forward to hear more from you. Thanks

comment:5 Changed 4 years ago by Jakub Ś

Please don't just copy/paste the code but adjust it to what you use inside your page.

If for example editors are created automatically and not with replace or inline method, you need to use something like:

CKEDITOR.on( 'instanceCreated', function( event ) {
	var editor = event.editor;	
				
	 editor.on( 'contentDom', function( e ){
                   var editable = editor.editable(),
                        element = editable.$;

                    if ( element.addEventListener ) {
                        // IE up to 10.
                        element.addEventListener( 'mscontrolselect', function( evt ) {
                            evt.preventDefault();
                        } );
                    } else {
                        // IE11 and higher.
                        element.attachEvent( 'oncontrolselect', function( evt ) {
                            evt.returnValue = false;
                        } );
                    }
         });
});   	

I'm sorry but this isn't support site. You have reported bug in CKEditor and I have shown you original bug report and a workaround. If you have problems implementing the code and you have CKEditor license, please contact our support team. You can also ask your questions at Stack Overflow.

Note: See TracTickets for help on using tickets.
© 2003 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy