IE7 issue with HTML Editor (disappears)

IE7 issue with HTML Editor (disappears)

by Anthony Borrow -
Number of replies: 6
Picture of Core developers Picture of Plugin developers Picture of Testers
When editing questions using Moodle 1.8 (2007021505), a user starts out and is able to use the HTML Editor; however, then it appears that some type of split occurs in the editor where the text only takes up about half of the width of the editor and the HTML Editor no longer will come up. It lasts for the duration of the session and seems to be isolated to IE7 (I have not tested with IE6) but I do not get this with FF2. Any thoughts as to where I should look or should I just take the easy way out and tell my users to use Firefox? After I get caught up I will go in and see if I can figure out what might be causing the problem by looking at the HTML source for the page in question and see if I can better isolate the problem but if someone else has a good inkling I would appreciate hearing about it.
Average of ratings: -
In reply to Anthony Borrow

Re: IE7 issue with HTML Editor (disappears)

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Ah, so it is not just us experiencing this!

I had not seen this post before, it has just been brought to my attention. Coincidentally I was trying to investigate this yesterday. Here is what we have managed to find so far:

It does depend on the computer that is being used. On my colleague Phil's laptop with IE7 it is now completely reproducable. There is one quiz question where if you go to the editing screen (question/question.php?id=xxx) it always zaps the editor. There are 14 HTML editors on that screen.

However, I have never managed to reproduce it on my desktop machine, despite adding more and more options to a multiple choice questions until I was up to over 30 editors on the page.

We have managed to make this happen on IE6. We have never seen it on Firefox.

Despite turning on all the available IE debugging options, we have never managed to get any sort of error message.

Once the HTML editor dies, actually, it is not just the HTML editor that is dead, it is the whole of IE's JavaScript engine. For example, if you then go to the admin page, where normally the admin block has a collapsible tree view using JavaScript, that no longer works either.

On IE6, the only way to unlock it seems to be to completely quit IE then reload it. On IE7, if you open a new tab, the editor works in the new tab, at least for a while.

Logging out then back in does not do any good.

We tried exporting the 'killer question' and importing it to another server. Actually we imported it to two other servers. One was also running the OU's customised version of Moodle, and it was still a killer question there. The other one was a standard Moodle 1.8.1+ install, and there it did not kill the editor. We have only made a few tiny and trivial changes to the HTML editor, but that is where I will continue my investigations today.


Those are what I have observed. Now my interpretation: I think this is some sort of bug in IE's JavaScript engine, and there is nothing we can do about it, unless we can find a workaround that avoids triggering it.

I don't know how I would go about reporting it to Microsoft. Why can't commercial software companies be more like open source projects?
In reply to Tim Hunt

Re: IE7 issue with HTML Editor (disappears)

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
I finally got time to investigate this further, and it gets weirder and weirder.

I started from the observation that the 'killer question' mentioned above only kills our version of Moodle, not Moodle 1.8 or head.

So I tried copying the Editor code from HEAD to overwrite our customised code. No dice. Still OU moodle with the core editor code kills IE, but core moodle doesn't.

So then (and I don't really know why I thought this would make a difference) I tried switching OU moodle to the standard theme. Magic. Suddenly OU Moodle no longer kills IE.

Now I just have to work out which bit of our theme is causing the problem.
In reply to Tim Hunt

Re: IE7 issue with HTML Editor (disappears)

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Found it!

In our header, there was some crappy JavaScript written by our corporate brand people that we were obliged to include, that used code like

someelement.innerHTML = 'something';

When I commented out the lines that used innerHTML, our theme stopped killing IE.

So the moral is, use proper standards-compliant DOM scripting.

Of course, that is what I already do. I now have to convince our brand people that this is important. Wish me luck.
In reply to Tim Hunt

Re: IE7 issue with HTML Editor (disappears)

by Russ Lymer -
Hi did anyone manage to sort this problem out i am having the same problem using Moodle 1.6.6+ and in the quiz mod when i edit a question it breaks the whole moodle

Any help appreciated.

Thanks
In reply to Russ Lymer

Re: IE7 issue with HTML Editor (disappears)

by Russ Lymer -

Upgraded to 1.9.6+ and i still have the same problem in IE7.  Works fine in Firefox can anyone help?

Thanks

In reply to Tim Hunt

Re: IE7 issue with HTML Editor (disappears)

by Russ Lymer -
Hi,

did this ever get sorted out i am using ie7 with Moodle 1.9.6 and i am getting the same thing but only for the quiz section. Seems to work fine first time of entering the quiz but on the second attempt it breaks and when you enter any editor again it is broke for the whole site.

Thanks

Russ