From: SourceForge.net <no...@so...> - 2008-01-29 05:54:29
|
Patches item #1847594, was opened at 2007-12-09 17:47 Message generated for change (Comment added) made by nobody You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=782466&aid=1847594&group_id=151897 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: Fix for IE6 and hidden panels Initial Comment: I had trouble with IE6 (and below) applying line-height to an anthem:Panel with Visible="false". Anthem renders this for a hidden panel: <div id="controlId"></div> http://lists.evolt.org/archive/Week-of-Mon-20070416/189398.html suggests that the following stops the problem: <div id="controlId"><!-- --></div> To implement, add the following at line 52 of Panel.cs: else { // This is so that IE6 doesn't apply line height to an empty div writer.Write("<!-- -->"); } Cheers, Gavin. ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2008-01-28 21:54 Message: Logged In: NO Hi psiegers. The code has fixed the rendering bug in the following browsers: - Internet Explorer 6 - Internet Explorer 5.5 The code has been used in the following browsers with no ill effects: - Firefox 2.0 - Opera 9 - Internet Explorer 7 - Safari 3 All browsers are running on Windows XP SP 2 Cheers, Gavin. ---------------------------------------------------------------------- Comment By: Pieter Siegers (psiegers) Date: 2008-01-17 08:25 Message: Logged In: YES user_id=1067768 Originator: NO Hi Gavin, did you test this code only in IE6 or also in other browsers? PD: I'm talking about the following code (added to Panel.cs starting from line 52): else if (!Manager.IsCallBack) { // This is so that IE6 doesn't apply line height to an empty div writer.Write("<!-- -->"); } ---------------------------------------------------------------------- Comment By: Pieter Siegers (psiegers) Date: 2007-12-31 09:25 Message: Logged In: YES user_id=1067768 Originator: NO Hi all, I agree with Manu, and think that adding a css class id is a good idea. ---------------------------------------------------------------------- Comment By: TweeZz (tweezz) Date: 2007-12-09 23:13 Message: Logged In: YES user_id=1472130 Originator: NO Hi Andy, I think the second solution you suggested is somehow 'safer'. At least for the applications I wrote using Anthem. I'm a heavy prototype user. In some cases I retrieve elements using css selectors. Sometimes a part of the selector includes the wrapper 'div'. Changing it into a 'span' would break code, maybe not only in my applications. Maybe I'm being to selfish here :) ---------------------------------------------------------------------- Comment By: Andy Miller (afm_44) Date: 2007-12-09 19:38 Message: Logged In: YES user_id=1245761 Originator: NO Great tip! I suppose this applies to all of the Anthem controls that wrap the native control inside of a <div>. Since the type of element that is used does not matter to Anthem, perhaps we should always use an inline control when the native control is not visible (i.e. use <span></span> when Visible=false, and <div></div> otherwise). Or we could assign a class to the wrapper element such as <div class="anthem"> wrapped HTML </div> <div class="anthem hidden"></div> Then you could modify your stylesheet to do anything you want with Anthem controls. ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2007-12-09 18:23 Message: Logged In: NO Correction. Code should be: else if (!Manager.IsCallBack) { // This is so that IE6 doesn't apply line height to an empty div writer.Write("<!-- -->"); } Gavin. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=782466&aid=1847594&group_id=151897 |