Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 1.6.3, 1.7, 1.8
-
Component/s: HTML Editor
-
Labels:None
-
Affected Branches:MOODLE_16_STABLE, MOODLE_17_STABLE, MOODLE_18_STABLE
-
Fixed Branches:MOODLE_18_STABLE, MOODLE_19_STABLE
Description
Hyperlinking an image using the html editor gives strange behaviour using different browsers.....
In Firefox (I'm using 1.0.7), try this.
insert an image, give it a useful alt text - eg "image"
then make sure the image is selected and use the hyperlink button to create a hyperlink for the image.
for the hyperlink title use some useful text like "URL" - then hit ok.
Instead of creating a hyperlink, in Firefox, the Image disapears, however the image alt text appears in place of the image as "text" (If that makes sense!)
In IE 6 you get a JS error like mentioned here:
http://moodle.org/mod/forum/discuss.php?d=55696
In IE 7 (Beta 2) you don't get a JS error, but when you try to add a link to an image, the insert Link window doesn't do anything when you hit "OK" - it just sits there, and makes no changes to the underlying window (this is possibly just an IE 7 quirk, - might be improved in the next version....) - I'll upgrade to RC 1 to see If I can get any more debug info out! ( I will upgrade FF as well to see if that makes any difference.
Issue Links
| This issue is a clone of: | ||||
| MDL-11387 | CLONE -hyperlinking an Image using the HTML Editor does not work. |
|
|
|
| This issue is duplicated by: | ||||
| MDL-7650 | CLONE -hyperlinking an Image using the HTML Editor does not work. |
|
|
|
| MDL-6720 | Can't add links to inserted images in the HTML Editor |
|
|
|
| MDL-10774 | HTML Edtior failing to add image links |
|
|
|
| This issue has a non-specific relationship to: | ||||
| MDL-19167 | Linking multiple elements (eg. image + text) im htmleditor causes broken link to moodle.org |
|
|
|
In IE 7 RC1 debugging is slightly better - you get the standard runtime error window "object doesn't support this property or method" - refers to Line 1348
if you actually debug the code it throws a couple of errors:
Line 76 of lib/editor/htmlarea/dialog.js - This line:
action(val);
throws an error "Object doesn't support this property or method"
if you ignore that error you also get this error:
Line 1348 (actually line 1387) of lib/editor/htmlarea/htmlarea.php This line:
range.pasteHTML(html);
throws an error "object doesn't support this property or method"
Dan