Ticket #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();
