Opened 10 years ago

Closed 4 years ago

#773 closed Bug (fixed)

Wrong HTML-Code using IE and a Div with "height:100%;"

Reported by: anonymous Owned by:
Priority: Normal Milestone:
Component: General Version:
Keywords: IE SF Cc: siff@…

Description

  1. On the FCKeditor demo

(http://www.fckeditor.net/demo/), I click on the "source"-button (top left) and insert the following html-code:

<div id="test" style="BORDER-TOP-STYLE: solid;
BORDER-RIGHT-STYLE: solid; BORDER-LEFT-STYLE: solid;
HEIGHT: 100%; BORDER-BOTTOM-STYLE: solid">
<img height="21" alt="" width="60"
src="http://www.google.ch/intl/de_ch/images/logo.gif" />
<br /> <br />
This is some <strong>sample text</strong>. You are
using <a href="http://www.fckeditor.net/">FCKeditor</a>.
</div>
  1. After clicking on the "source"-button again, the

text shows up correctly formatted (i.e. bold applied to "sample text") in the FCKeditor.

  1. I click on the google-logo image which is displayed

inside the editable area and then on the "insert/edit link" in the toolbar to add a link to the image. A new window pops up and I'm able to enter the URL (i.e. www.google.ch).

  1. After clicking on the "source"-button, I get the

following html-code:

<a href="http://www.google.ch">www.google.ch</a>
<div id="test" style="BORDER-TOP-STYLE: solid;
BORDER-RIGHT-STYLE: solid; BORDER-LEFT-STYLE: solid;
HEIGHT: 100%; BORDER-BOTTOM-STYLE: solid"><img
height="21" alt="" width="60"
src="/_userfiles/Image/pic icon.jpg" /><br />
<br />
This is some <strong>sample text</strong>. You are
using <a
href="http://www.fckeditor.net/">FCKeditor</a>. </div>
  1. The html-code that is produced using Internet

Explorer 6.0 is not the code that should be generated (a-tag placed around a new text instead of around the picture).

  1. When striking out the "height: 100%;" in the Div-tag

and repeating the steps, IE generates correct html-code.

I also tested it with Firefox 1.0.7 and correct html-code was generated, wheter "height: 100%;" existed or not. So it seems that only IE users are affected.

Thanks, saimen (moove[at]gmx.net)


Moved from SF:
http://sourceforge.net/tracker/index.php?func=detail&aid=1550547&group_id=75348&atid=543653

Change History (9)

comment:1 Changed 10 years ago by Martin Kou

Cc: siff@… added
Reporter: changed from Martin Kou to anonymous

The same problem or function - which affecting this bug i think.

http://sourceforge.net/tracker/index.php?func=detail&aid=1563393&group_id=75348&atid=543653

But the coders won't fix it... :/


Moved from SF. Original poster: siff

comment:2 Changed 10 years ago by Alfonso Martínez de Lizarrondo

Keywords: Confirmed IE added

comment:3 Changed 10 years ago by Martin Kou

Milestone: FCKeditor 2.6

comment:4 Changed 9 years ago by Martin Kou

Tested with the SVN version, now the image URL won't even display in step 3.

comment:5 Changed 9 years ago by Martin Kou

Owner: set to Martin Kou
Status: newassigned

comment:6 Changed 9 years ago by Martin Kou

Weired... The height:100% style attribute seems to be interfering with FCKeditor's selection logic in IE, which should be causing this bug. A simple test case:

<div style="height: 100%"><img src="http://www.google.ch/intl/de_ch/images/logo.gif" /></div>

Switch back to WYSIWYG mode, right click on image, and choose "Image Properties" - the image's URL isn't there.

Now switch to Source mode, delete the style attribute, and switch back to WYSIWYG mode. Right click on the image and go to the Image Properties dialog again - the URL is there.

So I guess what happened to the Link dialog in the bug report is very similar - the "height: 100%" makes the Link dialog unable to get the currently selected element in the editing area, and so the link inserted would appear in the beginning of the document.

comment:7 Changed 9 years ago by Frederico Caldeira Knabben

Milestone: FCKeditor 2.6

This is an IE bug. It is quite difficult to workaround. Its impact is quite low at our user's base, so I'm retargeting it for now.

comment:8 Changed 9 years ago by Martin Kou

Owner: Martin Kou deleted
Status: assignednew

comment:9 Changed 4 years ago by Piotrek Koszuliński

Resolution: fixed
Status: confirmedclosed

This issue expired - WFM on master.

Note: See TracTickets for help on using tickets.
© 2003 – 2017 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy