10 July 2004
IE's duplicate characters bug (DCB)
Earlier this week I was working our ecommerce system ( www.retailplus.bz – new site in the pipeline), bringing it inline with web standards, and getting rid of older techniques. In the process of doing so Internet Explorer's duplicate characters bug reared its ugly head.
I have faced this foe before, but I could not remember its weak point so that I could kill it. Thus, I went to the oracle of IE bugs for help - Big John at Position Is Everything.
After reading the page about our mean little critter, I spent a good deal of time looking for the HTML comments that PIE told me is the cause of my bug. I didn't find them and so I began to curse the air.
After that I gave up on it for a while, and did something else. When I came back to it the answer was staring me in the face like an unhappy trout. It was in fact a hidden form field.
It seems that HTML comments are not the only elements that can summon the DCB, but also other HTML elements that are hidden from view. After letting John know about this, he updated his page, theorising that elements set to display:none; might also have the same effect. I haven't tried this, and I am worried that John might have misunderstood the email I sent. I will have to check with him.
But, anyway, enough of that nonsense, and my silly way of telling you that hidden form elements also cause the DCB as well as HTML comments.
- Time: 20:39
- Wubb Development
Comments ( 8 )
Malarkey
The IE double margin bug is fairly easy to deal with as PIE describes. But only this week I saw your suggestion on PIE on the subject of the Duplicate Characters bug in IE6.
This little critter is a pig to deal with sometimes and I found out from bitter experience that elements hidden with display:none DO cause the issue...
Well spotted matey...
Phil Baines
Haha
No more blogging after beers, in the middle of a LAN party.
Luc
Double or nothing?
Phil Baines
beer does funny things
DrDoc
Double margin, duplicated characters and such...
DrDoc
Bug trigger...
> theorising that elements set to display:none; might also
> have the same effect. I haven't tried this, and I am
> worried that John might have misunderstood the email I
> sent. I will have to check with him.
I don't think he misunderstood it. The fact is, any "non-content" element will trigger the bug, such as:
<!-- regular comments -->
display:none;
<input type="hidden">
<script type="text/javascript"> </script>
...etc.
None of the above elements generate any substantial content, which means they also all trigger the bug.
Big John
Hallelujah!
Oops, I almost forgot; Woohoo! Rainer has conquered the 3px jog, and that is no small thing. So easy to fix, but so evil without the fix. I salute you.
Phil Baines
well well
DrDoc, yes, Big John is right, and so are you. I think Malarkey pointed that out to me above.
Big John, I dont know if this is 'the place', and I am sure that there are better places around. I am glad that you made it here anyway, and the more people that come this way, the better.
Sorry, commenting has been disabled for a while. I am getting a stupid amount of comment spam, and need to find a new way of doing things.
I will not publish your email address, but I may use it to get in contact with you.
HTML tags and entities display as source; they do not render. To create a live link, simply type the URL (including http://).