FireFox 3.6 KTML Editor Fix

With the introduction of Firefox 3.6 today I was alerted that the KTML editor used by some clients wasn't fully loading. The error indicated a missing setter. It turns out it is an easy fix.

In the file

/ktm/core/mozilla_ie_compat.js

you will find

view plain print about
1obj_doc.readyState = "complete";

This line is trying to set what FF 3.6 apparently thinks is a read only variable. I removed the line. So far no issues.

Next the file:

/ktm/modules/css/scripts.js

view plain print about
1if (this.edit.readyState != "complete") {
2setTimeout(function () {
3_this.init_fillCssClasses();
4},
5400);
6return;
7}

As a dirty hack to test I simply changed it to

view plain print about
1if (1 == 0) {
2setTimeout(function () {
3_this.init_fillCssClasses();
4},
5400);
6return;
7}

Basically the code always waited for the complete value in the readystate but firefox wasn't setting it. So it would never fire. Now we force it to fire by skipping the reload timeout.

So far these are the only two items to fix and the editor is working back to normal. However I am not 100% certain other issues may not come up.

The javascript is minified, so can be hard to read. If you ever need to read it there are some online utilities to help make it readable again. I found this one to be very useful.

TweetBacks
Comments
JD's Gravatar Thanks for the fix, it worked. Have you seen any issues with the editor and CSS Styles drop down? We seem to have lost the ability to view or select styles.
# Posted By JD | 1/25/10 4:14 PM
joshua's Gravatar I have seen FF have issues if the HTML in the editor is super redundant (font on font on font) or malformed. Cleaning up the HTML fixed the drop down. Odd that they were connected though.
# Posted By joshua | 1/25/10 4:29 PM
Fred's Gravatar html as in the page the editor is implemented on or the actual editor itself?
# Posted By Fred | 1/30/10 9:32 AM
joshua's Gravatar For me it will sometimes not allow the editor to change into code view, or when a user does change to code view it deletes all code. I find it only does this with multiple tags wrapping other tags (font over font over font).
# Posted By joshua | 1/30/10 10:27 AM
Fred's Gravatar I have noticed that myself but the problem I have is the editor page is empty, so there is nothing in the "text field", yet I still can't use the css dropdown.
# Posted By Fred | 1/30/10 12:35 PM
joshua's Gravatar I have a new patch actually. The fix above kills the drop down. I want to test this more over the weekend and will blog on the updated patch on Monday. Basically the /ktm/modules/css/scripts.js file has code that checks if readystate is complete before it fires, however our update above prevents that from firing. Removing that code check will let the css load properly.
# Posted By joshua | 1/30/10 1:32 PM
Fred's Gravatar Saw the same and tried to remove the following:
if (this.edit.readyState != "complete") {
setTimeout(function () {
_this.init_fillCssClasses();
},
400);
return;
} else {

Problem is my Javascript experience is not worth mentioning.
# Posted By Fred | 1/30/10 2:26 PM
joshua's Gravatar if I remember right, just change (this.edit.readyState != "complete") to (1 == 0)

It is a crappy hack but basically forces the else which triggers the css mod to load.
# Posted By joshua | 1/30/10 2:34 PM
Richard's Gravatar These fixes have worked on some issues, but any idea why the paragraph button no longer wants to work in the editor? Other source html buttons work just not the paragraph button
# Posted By Richard | 2/2/10 10:41 AM
Dario Vargas's Gravatar Gracias por publicar la solución a la compatibilidad del KTML a Firefox 3.6 y la solucion al panel de subir archivos o subir imagenes por el KTML en internet explorer, realizamos estos dos ajustes y el KTML siguió funcionando de maravilla!, gracias por compartir este post, Saludos desde Colombia.
# Posted By Dario Vargas | 2/6/10 4:07 PM
wayne's Gravatar i have been having issues with the code editor myself, it seems i can no longer copy and paste or that when i paste code into the code editor it submits nothing, has anyone any hacks?
# Posted By wayne | 3/4/10 12:01 PM
Al Johnson's Gravatar HI,

I am still fighting to keep my code going as there is nothing better than KTML nad I have written many mods over the years.

A better fix is simply to change

obj_doc.readyState = "complete";

to

obj_wnd.readyState = "complete";

the varibale is now still added to the object allowing the other code/functionality to remain in place. This probably was always a bug only it took FF 3.6 to expose it.

I love to hook up with anyone interested in keeping KTML/Interakt suite current. I am currently trying to get it fixed to work with PHP 5.3 (this may be a step too far ;-)
# Posted By Al Johnson | 3/9/10 7:50 AM
Joshua's Gravatar While changing that far will load the editor, does it show the drop down class menu correctly now?
# Posted By Joshua | 3/9/10 10:04 AM
Fred's Gravatar Found another bug in Firefox 3.6
When inserting a table you can't select the number of columns.
So I assume something in inserttable.js needs to be fixed.

Like I said previously my java is no good.
Anyone with a solution?
# Posted By Fred | 3/12/10 11:00 AM

NAVIGATION

Home
About Me

RSS


Search

Subscribe

Enter your email address to subscribe to this blog.

Recent Entries

Flash Camp Boston
New Blog Design
Pre-Conference Training at cf.Objective()
FireFox 3.6 KTML Editor Fix
I am now a part of the Adobe Community Professionals Group

Recent Comments

FireFox 3.6 KTML Editor Fix
Fred said: Found another bug in Firefox 3.6 When inserting a table you can't select the number of columns. So I... [More]

Repeating Events Question
ueghbxedu said: UaejcB <a href="http://ysyhrmkbkhco.com/&...;, [url=http://pwncz... [More]

Repeating Events Question
fadxkfyuadn said: n6qVCL <a href="http://bdiorhdtbwzb.com/&...;, [url=http://uvnao... [More]

FireFox 3.6 KTML Editor Fix
Joshua said: While changing that far will load the editor, does it show the drop down class menu correctly now? [More]

FireFox 3.6 KTML Editor Fix
Al Johnson said: HI, I am still fighting to keep my code going as there is nothing better than KTML nad I have writt... [More]

Calendar

Sun Mon Tue Wed Thu Fri Sat
 123456
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31    

Archives By Subject

blogs (31) [RSS]
books (4) [RSS]
Crazy (39) [RSS]
DIY (8) [RSS]
Flex (3) [RSS]
games (10) [RSS]
GRRR (13) [RSS]
Ideas (11) [RSS]
Local (14) [RSS]
LOLpics (2) [RSS]
money (9) [RSS]
music (3) [RSS]
Personal (27) [RSS]
Photos (8) [RSS]
Politics (8) [RSS]
Projects (22) [RSS]
Review (18) [RSS]
RPM (9) [RSS]
Spam (16) [RSS]
Technology (66) [RSS]
Testing (3) [RSS]
TV (15) [RSS]
video (32) [RSS]
Web Dev (218) [RSS]
World of Warcraft (16) [RSS]