Opened 13 years ago
Closed 9 years ago
#4560 closed defect (wontfix)
layout widgets don't react to browser font-size adjustments correctly
Reported by: | Becky Gibson | Owned by: | bill |
---|---|---|---|
Priority: | low | Milestone: | future |
Component: | Accessibility | Version: | 0.9 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description (last modified by )
In test_TabConainer.html when you resize the font in Firefox, the left hand tabs will over write the tab panel contents.
Also, in dijit/demos/mail.html, when the font is resized, the inbox tab title is not resized properly - although this could be a layout container issue rather than a tab container issue.
Change History (23)
comment:1 Changed 13 years ago by
comment:2 Changed 13 years ago by
Owner: | changed from Becky Gibson to simonjb |
---|
comment:3 Changed 13 years ago by
Status: | new → assigned |
---|
comment:4 Changed 13 years ago by
It looks to me like the cause of the layout not reflowing on font size change is the use of "absolute" positioning. TabContainer.layout() contains these statements:
var children = [ {domNode: this.tablist.domNode, layoutAlign: titleAlign}, {domNode: this.containerNode, layoutAlign: "client"} ]; dijit.layout.layoutChildren(this.domNode, this._contentBox, children);
The call to layoutChldren() causes a "dijitAlignClient" class to be added to containerNode. dijit.css contains:
body .dijitAlignClient { position: absolute; }
(the tabs are also in an "absolute" positioned div)
I'm thinking that addressing this might involve reworking the layout mechanism to not use absolute positioning. Or as Bill suggests above, keep the layout using absolute positioning but listen for font size changes and trigger a relayout. Becky, what to you think is the relative priority for reflowing on text change. Is it something we need for 1.0?
comment:5 Changed 13 years ago by
End of last paragraph on last comment should read:
Becky, what do you think is the relative priority for reflowing on font size change. Is it something we need for 1.0?
comment:6 Changed 13 years ago by
Does it work okay if reload the page after making the font size change? I can certainly live with that.
comment:8 Changed 13 years ago by
Summary: | issues resizing tab container → layout widgets don't react to browser font-size adjustments correctly |
---|
Regarding:
It looks to me like the cause of the layout not reflowing on font size change is the use of "absolute" positioning.
Right, and this is inherent in the design of all the layout widgets. We could probably fix it easily on IE by using expressions(), but on the other browsers it's harder, even after implementing http://www.alistapart.com/articles/conflictingabsolutepositions.
I think that you can either
- close this bug as a "wontfix", and require users to refresh the page after changing the font-size (yuck)
- defer the bug to 1.1, and then implement some hack to detect browser font-size changes, perhaps an off-screen <div> with some text in it that you monitor for size changes. (yuck)
Probably should talk about it in the dijit meeting and then decide.
comment:9 Changed 13 years ago by
This should be wontfix or 1.1 as long as Simon isn't in the middle of /close to a fix.
comment:10 Changed 13 years ago by
I'm not currently working on this. Becky, please close or move to 1.1.
comment:11 Changed 13 years ago by
Resolution: | → wontfix |
---|---|
Status: | assigned → closed |
requiring a resize after changing font sizes is sufficient - closing as wontfix
comment:12 Changed 13 years ago by
Milestone: | 1.0 → 2.0 |
---|---|
Resolution: | wontfix |
Status: | closed → reopened |
I'd like to consider doing this at some point; it should just be a few lines of code, to fire a "resize" event on font change. I'm going to mark it as 2.0 so we can at least think about it.
comment:14 Changed 13 years ago by
Owner: | changed from simonjb to davidb |
---|---|
Status: | reopened → new |
comment:15 Changed 12 years ago by
Description: | modified (diff) |
---|---|
Milestone: | 1.3 → future |
comment:17 Changed 11 years ago by
Owner: | changed from davidb to Becky Gibson |
---|
comment:18 Changed 10 years ago by
Owner: | changed from Becky Gibson to bill |
---|
reassign due to inactive committer. please triage accordingly.
comment:19 Changed 9 years ago by
Summary: | layout widgets don't react to browser font-size adjustments correctly → layout widgets don't react to browser font-size adjustments / zoom correctly |
---|
comment:20 Changed 9 years ago by
Summary: | layout widgets don't react to browser font-size adjustments / zoom correctly → layout widgets don't react to browser font-size adjustments correctly |
---|
See #13810 for zoom issues.
comment:21 Changed 9 years ago by
See initOnFontResize() in dojox/html/metrics.js. It creates an off-screen iframe which (for some reason) gets a resize event whenever the browser font size is changed.
OTOH this ticket is becoming less important as most browsers now do zooming instead of font-size changes.
comment:22 Changed 9 years ago by
Keywords: | needsreview added |
---|---|
Priority: | high → low |
bill, you seem like you could be convinced to close this. what do you think?
comment:23 Changed 9 years ago by
Keywords: | needsreview removed |
---|---|
Resolution: | → wontfix |
Status: | new → closed |
Yah, sure, I'll close; it's a toss up.
Hmm, I assume you are talking about changing the font size after the tab has displayed, and not reloading the page, in which case it doesn't re-layout() itself? It's monitoring screen resize events on the screen but I don't know anyway to monitor resizing the font (except I guess having a timer loop that monitors the size of some offscreen text). Maybe you know a better way.
This is a bigger issue than just tabs; same thing for AccordionContainer?, or LayoutContainer?'s computation of the height of the top/bottom components (if not specified explicitly), etc.