Loading...
 
Skip to main content

Wysiwyg Image Plugin Editor in IE7 erases image on insert

Status
Pending
Subject
Wysiwyg Image Plugin Editor in IE7 erases image on insert
Version
6.x
Category
  • Error
Feature
WYSIWYG (What You See is What You Get)
Submitted by
Nelson Ko
Lastmod by
Nelson Ko
Rating
(0)
Description

Only happens in real IE7. IE8 in IE7 compatibility mode does not have this problem.

Basically an attempt to edit the image plugin parameters followed by clicking on "Insert" results in a JS error "Invalid argument" at line 4929 of lib/jquery/jquery.js (r30367). If you continue through the error, the image disappears.

Copy to clipboard
clean: .... ..... if ( fragment ) { ....... if ( ret[i].nodeType === 1 ) { ret.splice.apply( ret, [i + 1, 0].concat(jQuery.makeArray(ret[i].getElementsByTagName("script"))) ); } fragment.appendChild( ret[i] ); // this is line 4929


If the image is at the end of a paragraph (or on a line of it's own) resulting in the following cases, you will have the problem.

Copy to clipboard
<p> Paragraph text{img fileId="10" rel="box[g]" imalign="left"}</p>

Copy to clipboard
<p> {img fileId="10" rel="box[g]" imalign="left"}</p>


If you instead have text after the image, the problem does not appear. For example, the following are both OK.

Copy to clipboard
<p> Paragraph text{img fileId="10" rel="box[g]" imalign="left"}Paragraph Text</p>

Copy to clipboard
<p> {img fileId="10" rel="box[g]" imalign="left"}Paragraph Text</p>


I suspect (just a theory) maybe the plugin replacing procedure is wiping out the closing para tag leading to malformed HTML that IE7 does not like. A search on the web on similar errors in relation to Jquery show that IE7 is very sensitive to unclosed tags or malformed HTML in inserted text.

Solution
Workaround fix in r30461.
Importance
9 high
Priority
45
Demonstrate Bug on Tiki 19+
Demonstrate Bug (older Tiki versions)
Ticket ID
3615
Created
Wednesday 27 October, 2010 23:32:28 UTC
by Nelson Ko
LastModif
Monday 01 November, 2010 23:21:00 UTC


Show PHP error messages