Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 1.9.5
-
Fix Version/s: None
-
Component/s: HTML Editor
-
Labels:
-
Environment:RHEL 5 server - vista/IE 8 client
-
Database:MySQL
-
Affected Branches:MOODLE_19_STABLE
Description
When using the HTML editor (htmlarea) in IE 8 you can not create two links in the same editor. Attempting to do so yields the following javascript error :
'length' is null or not an object htmlarea.php?id=3425, line 1484 character 9
-------
To reproduce use IE 8 without 'compatibility mode'
Create a new label..
enter in html area:
one<enter>
two<enter>
highlight 'one' and create a link to www.one.com (that will work)
highlight 'two' and try to create a link to www.two.com (you will get the javascript error).
---------
This is probably due to the fact that IE 8 contains some changes... such as this one - detailed here:
"7.) The attributes[] array on elements should (from the RC build onwards) be correct in terms of contents, have a length, etc."
http://social.msdn.microsoft.com/Forums/en-US/iewebdevelopment/thread/772e4b07-29e1-4909-b77f-f61c503f9579
---------
I hacked together a work around in the patch... I essentially added a check for HTMLArea.is_ie_lt8 and then modified the offending shorthand if to make use of it... see attached patch... not sure if other areas of the code could make use of is_ie_lt8 - haven't found any yet but I'm guessing they are there...
I have been able to add several links with IE8 all the time - maybe this has some realation to http://tracker.moodle.org/browse/MDL-18645