ChavezArquitectos / curvycorners

Automatically exported from code.google.com/p/curvycorners
0 stars 0 forks source link

CC leaves display:none boxes as "block" #71

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create a div, assign it display:none and a border radius in CSS
2. Load the page with CC active in the page
3. Box display none will be altered to display:block, so will show when
author doesn't want it to show.
4. Evident in IE only of course (tested in 8)

What is the expected output? What do you see instead?
At step 3 the box should retains it's display property after the
clientWidth is determined.

What version of the product are you using? On what operating system?
CC 2.1 beta (latest download at date)

Please provide any additional information below.
At line 430:

    // here, we've found the box whose display is set to 'none'.
    var boxDispSave = boxDisp.style.display;
    boxDisp.style.display = 'block'; // display in order to get browser to
calculate clientWidth
    boxWidth = this.box.clientWidth;

I 'fixed' this by adding a line:
// here, we've found the box whose display is set to 'none'.
    var boxDispSave = boxDisp.style.display;
    boxDisp.style.display = 'block'; // display in order to get browser to
calculate clientWidth
    boxWidth = this.box.clientWidth;
    boxDisp.style.display = boxDispSave;

Obviously this might result in the box appearing for a short time. Maybe
display none boxes could be stored in memory and the CC applied when their
display turns to 'block'. e.g listen for the style change, if possible.

Thanks!
James

Original issue reported on code.google.com by james.el...@gmail.com on 10 Apr 2010 at 2:03

GoogleCodeExporter commented 8 years ago
Cannot reproduce this problem either using 2.1Beta or the latest version 
(r170). Many 
rounded DIVs are set display:none in tab demo 5: they get reset correctly to 
display:none after the corners are calculated.

If I can see an example where the display is not set correctly, I will re-open 
this 
bug.

Original comment by c.1%smit...@gtempaccount.com on 11 Apr 2010 at 9:29

GoogleCodeExporter commented 8 years ago
Im getting this same bug also. When I run the page with an element that has a 
display:none it throws errors in IE8 and when I remove the display:none from 
the element no errors are thrown. I added that <script type="text/javascript">
var curvyCornersVerbose = false;
</script> as sugested and the errors dont show but then again the page elements 
dont get styled.

Original comment by nerudomr...@gmail.com on 25 Jul 2011 at 9:44