Opened 14 years ago
Closed 14 years ago
#3231 closed defect (wontfix)
ProgressBars without label cause problems on Safari
Reported by: | simonjb | Owned by: | bill |
---|---|---|---|
Priority: | low | Milestone: | 1.0 |
Component: | Dijit | Version: | 0.9 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
Please note that this problem does not occur on a recent WebKit build -- only Safari and as such may not be a high priority to address, depending on our level of support in Dijit for Safari.
ProgressBars that have a display:none style property set on dijitProgressBarEmptyLabel or dijitProgressBarFullLabel cause problems on Safari 2.0.4.
To reproduce:
- start Safari
- open dijit/tests/test_ProgressBar.html
- the page will not load properly: bars after "Small, without text and background image" will not show
- if you enable debug mode in Safari (
$ defaults write com.apple.Safari IncludeDebugMenu 1
) and open the JavaScript Console you will see "Null" logged to the console
I believe the problem is being caused by the label resizing in the update method:
var dim = dojo.contentBox(labelNode);
var labelBottom = (parseInt(dojo.getComputedStyle(this.domNode).height) - dim.h)/2;
labelNode.style.bottom = labelBottom + 'px';
dojo.contentBox(labelNode) is causing Safari troubles whenever labelNode has display:none.
Possible solution: if possible, avoid this code altogether and position label in CSS.
my understanding is dijit will only support Safari 3. Safari 2 is supported only by core.