Opened 13 years ago

Closed 13 years ago

#2450 closed defect (fixed)

Editor2 does not work with prototype in IE

Reported by: seggy@… Owned by: liucougar
Priority: high Milestone: 0.9
Component: Editor Version: 0.4.1
Keywords: editor2 prototype ie Cc:
Blocked By: Blocking:

Description

When dojo is used with the prototype library, the Editor2 widget fails in IE. This was described by Richard Livsey in: Incompatability with Editor2, prototype and IE6/7

Attachments (1)

ticket2450.diff (642 bytes) - added by seggy@… 13 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 Changed 13 years ago by seggy@…

The problem is very similar to #1671 and indeed the fix is similar to [6343], which fixes #1671: switching from for(var i in array) to for(var i=0; i<array.length; i++), this time in RichText?.js line 355.

comment:2 Changed 13 years ago by seggy@…

The line number in the previous post is from version 0.4.1. For trunk r7311, it is line 363

comment:3 Changed 13 years ago by seggy@…

  • src/widget/RichText.js

     
    360360                               //in the array below, ul can not come directly after ol, otherwise the queryCommandValue returns Normal for it
    361361                               var formats = ['p', 'pre', 'address', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ol', 'div', 'ul'];
    362362                               var localhtml = "";
    363                                for(var i in formats){
     363                               for(var i=0; i<formats.length; i++){
    364364                                       if(formats[i].charAt(1) != 'l'){
    365365                                               localhtml += "<"+formats[i]+"><span>content</span></"+formats[i]+">";
    366366                                       }else{

Changed 13 years ago by seggy@…

Attachment: ticket2450.diff added

comment:4 Changed 13 years ago by liucougar

Milestone: 0.9
Status: newassigned

comment:5 Changed 13 years ago by liucougar

Resolution: fixed
Status: assignedclosed

(In [7312]) fixes #2450 use new API instead of deprecated in richtext

Note: See TracTickets for help on using tickets.