Opened 10 years ago

Closed 9 years ago

#70 closed defect (wontfix)

IE problem loading page -- error accessing HTMLArea.I18N.tooltips

Reported by: henry.turco@… Owned by: gogo
Priority: highest Milestone:
Component: Xinha Core Version:
Severity: critical Keywords:
Cc:

Description

I was having a problem loading the example page “table-operations.html” in IE. I downloaded the latest nightly code to be sure it was a current problem. It was giving an error in the createButton() function when accessing HTMLArea.I18N.tooltips.textindicator in the "textindicator" case -- very strange. I just recently switched over from HTMLArea. And it was working there. Forgive me, but I recently noticed that it’s current version change the way you initialize. I compared the two files and made the following changes to the constructor and init functions. Also I removed the try block in createButton() and the call to HTMLArea.init() at the end of the script. And then you change the way it starts up (calling HTMLArea.init and setting HTMLArea.onload) That’s it.

Now it initializes successfully. I don’t prefer IE but it’s nice when we can get it to work. The user base is huge.

Here’s the diff between old/htmlarea.js and htmlarea.js
63a64,73

if (!HTMLArea._init_called) {

alert("Error: You must called HTMLArea.init() first. Like this:\n\n" +

"HTMLArea.init();\n" +
"HTMLArea.onload = function() {\n" +
" var editor = new HTMLArea('editor');\n" +
" editor.generate();\n" +
"};\n");

return;

}

151a162

HTMLArea._init_called = 1;

439c450
< try
---

if (typeof HTMLArea.I18N.tooltips[i] != "undefined")

441,444c452
< if (typeof HTMLArea.I18N.tooltips[i] != "undefined")
< {
< btn[0] = HTMLArea.I18N.tooltips[i];
< }
---

btn[0] = HTMLArea.I18N.tooltips[i];

446d453
< catch(e) { }
4615,4617d4621
<
<
< HTMLArea.init();

Attachments (1)

htmlarea.js (135.9 KB) - added by henry.turco@… 10 years ago.
script changes

Download all attachments as: .zip

Change History (4)

Changed 10 years ago by henry.turco@…

script changes

comment:1 Changed 10 years ago by marineam@…

The following is probably the more proper solution.
btw, the bug only happens for me if xenha is not cached by IE, after refreshing all
is well. This should fix the load order so it works when not cached.

Author: mccammos
Date: 2005-03-18 14:22:12 -0800 (Fri, 18 Mar 2005)
New Revision: 4430

Modified:
   webcalendar/includes/xinha/htmlarea.js
Log:
loadup language files a little earlier since something above referenced it in IE


Modified: webcalendar/includes/xinha/htmlarea.js
===================================================================
--- webcalendar/includes/xinha/htmlarea.js	2005-03-18 22:18:35 UTC (rev 4429)
+++ webcalendar/includes/xinha/htmlarea.js	2005-03-18 22:22:12 UTC (rev 4430)
@@ -155,10 +155,10 @@
   loadNextScript();
 };
 
+HTMLArea.loadScript(_editor_url + "lang/" + _editor_lang + ".js");
 HTMLArea.loadScript(_editor_url + "dialog.js");
 HTMLArea.loadScript(_editor_url + "inline-dialog.js");
 HTMLArea.loadScript(_editor_url + "popupwin.js");
-HTMLArea.loadScript(_editor_url + "lang/" + _editor_lang + ".js");
 
 // cache some regexps
 HTMLArea.RE_tagName = /(<\/|<)\s*([^ \t\n>]+)/ig;
@@ -709,6 +709,7 @@
       el.appendChild(document.createTextNode("A"));
       el.className = "indicator";
       el.title = HTMLArea.I18N.tooltips.textindicator;
+
       var obj = {
         name	: txt, // the button name (i.e. 'bold')
         element : el, // the UI element (DIV)
@@ -1649,7 +1650,6 @@
           }).toLowerCase() + ".js";
   var plugin_file = dir + "/" + plugin;
   var plugin_lang = dir + "/lang/" + _editor_lang + ".js";
-
   if(callback)
   {
     HTMLArea._loadback(plugin_file, function() { HTMLArea._loadback(plugin_lang, callback); });


comment:2 Changed 9 years ago by Niko <ns@…>

your problems should be fixed with #98.
this patch has to be carefully tested bevore it will be implemented.

comment:3 Changed 9 years ago by Niko <ns@…>

  • Resolution set to wontfix
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.