Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#10417 closed Bug (invalid)

What to do when IE's version 8 gives an Invalid Argument exception on 'moveToElementText '

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

Description

I am using ckeditor 0.4 version and testing it's functionality on ie 8. When I add table from toolbar first time, it works fine but when I add it the second time, it throws exception Invalid Argument exception on 'moveToElementText' field.

On debug I got exception on this line

x=t.duplicate(); x.moveToElementText(v); x.collapse(false);

I have spent quite some time on it but unable to find solution for it.

Attachments (1)

IE-8_tableIssue.jpg (266.4 KB) - added by gaurav14u 6 years ago.
I have ckeditor toolbar in content section... when I click on I am able to add table to it. When I click on add question button, it opens new instance of toolbar. Now when I click on table on this new instance I get invalid argument exception.

Download all attachments as: .zip

Change History (8)

Changed 6 years ago by gaurav14u

Attachment: IE-8_tableIssue.jpg added

I have ckeditor toolbar in content section... when I click on I am able to add table to it. When I click on add question button, it opens new instance of toolbar. Now when I click on table on this new instance I get invalid argument exception.

comment:1 Changed 6 years ago by gaurav14u

Version: SVN (CKEditor) - OLD

comment:2 Changed 6 years ago by Jakub Ś

Status: newpending

I am using ckeditor 0.4 version

Did you mean 4.0 or 0.4 version? I'm asking because you have changed version to SVN (CKEditor) - OLD.

Is there any chance for providing standalone reduced and working test-case file(s) that show(s) this problem?

comment:3 Changed 6 years ago by gaurav14u

It's 0.4 version. There are many files so it's difficult to send working files. But the issue occurs in IE 8 only. It gives 'invalid argument' exception on line given above. This is from ckeditor.js file. I am using 0.4 version of grails ckeditor plugin. When I change it to updated 3.6 version of grails ckeditor plugin then it works fine. But unfortunately I can not upgrade vesion of grails plugin.

I pasted some code below from ckeditor.js if it helps to understand the issue better. Bold line gives invalid argument exeption

var s=function(t,u){

t=t.duplicate();t.collapse(u);var v=t.parentElement(),w=v.childNodes,x; for(var y=0;y<w.length;y++){

var z=w[y];if(z.nodeType==1){x=t.duplicate();x.moveToElementText(z);var A=x.compareEndPoints('StartToStart',t),B=x.compareEndPoints('EndToStart',t); x.collapse(); if(A>0)break;

else if(!A
B==1&&A==-1)

return{container:v,offset:y};

else if(!B)return{container:v,offset:y+1};}}

if(!x){

x=t.duplicate(); x.moveToElementText(v); x.collapse(false);

} x.setEndPoint('StartToStart',t); var C=x.text.replace(/(\r\n|\r)/g,'\n').length;try{while(C>0)C-=w[--y].nodeValue.length;}catch(D){C=0;}

if(C===0)return{container:v,offset:y}; else return{container:w[y],offset:-C};

};

Last edited 6 years ago by gaurav14u (previous) (diff)

comment:4 Changed 6 years ago by gaurav14u

Version: SVN (CKEditor) - OLD

comment:5 Changed 6 years ago by Jakub Ś

Resolution: invalid
Status: pendingclosed

Hi,

Thank you for clarification but this makes the ticket invalid.

  1. We don't support CKEditor Grails - this is third-party implementation.
  2. If I'm looking at the same link then current version of this implementation is 3.6 and you talk about 0.4 - you probably have idea that this is very old and might contain very old editor version. I would recommend upgrade nevertheless.
  3. Since error occurs CKEditor JS files and is gone in newest version than perhaps you could simply upgrade CKEditor. Please see this link: https://github.com/stefanogualdi/grails-ckeditor/tree/master/web-app/js.

What you can do is go to http://ckeditor.com/download/releases and download CKEditor 3.6.4 - the same that CKEditor Grails is using. You could also try doing the same with CKE 3.6.6.1, perhaps it will work too. I would also encourage you to try using CKEditor 4.1.1 but there were few changes so I'm not sure it is will work with this implementation.

Anyway please try upgrading ckeditor folder - perhaps it will help and if not you should report this issue to implementation author.

comment:6 Changed 6 years ago by gaurav14u

Hi.. thanks for the update. I also thought of upgrading it but we are at the last sprint so it's not possible to do it right now since this functionality is used in many places & that is y I am thinking of adding patch to this.

If you are aware of this issue then please guide me else it's fine. Thanks again.

comment:7 Changed 6 years ago by Jakub Ś

I don't see such issue on bug tracker.

Please try upgrading ckeditor folder only - you will have server-side files untouched and you will exchange client code only.

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