Opened 12 years ago

Closed 7 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 bill)

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 12 years ago by bill

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.

comment:2 Changed 12 years ago by simonjb

Owner: changed from Becky Gibson to simonjb

comment:3 Changed 12 years ago by simonjb

Status: newassigned

comment:4 Changed 12 years ago by simonjb

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 12 years ago by simonjb

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 12 years ago by Becky Gibson

Does it work okay if reload the page after making the font size change? I can certainly live with that.

comment:7 Changed 12 years ago by simonjb

Yes, I believe it should layout correctly on a reload.

comment:8 Changed 12 years ago by bill

Summary: issues resizing tab containerlayout 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

  1. close this bug as a "wontfix", and require users to refresh the page after changing the font-size (yuck)
  2. 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 11 years ago by Becky Gibson

This should be wontfix or 1.1 as long as Simon isn't in the middle of /close to a fix.

comment:10 Changed 11 years ago by simonjb

I'm not currently working on this. Becky, please close or move to 1.1.

comment:11 Changed 11 years ago by Becky Gibson

Resolution: wontfix
Status: assignedclosed

requiring a resize after changing font sizes is sufficient - closing as wontfix

comment:12 Changed 11 years ago by bill

Milestone: 1.02.0
Resolution: wontfix
Status: closedreopened

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:13 Changed 11 years ago by alex

Milestone: 2.01.3

Milestone 2.0 deleted

comment:14 Changed 11 years ago by simonjb

Owner: changed from simonjb to davidb
Status: reopenednew

comment:15 Changed 10 years ago by bill

Description: modified (diff)
Milestone: 1.3future

comment:16 Changed 10 years ago by bill

dojox.html.metrics apparently watches for this event, see #8260.

comment:17 Changed 10 years ago by davidb

Owner: changed from davidb to Becky Gibson

comment:18 Changed 8 years ago by Chris Mitchell

Owner: changed from Becky Gibson to bill

reassign due to inactive committer. please triage accordingly.

comment:19 Changed 8 years ago by bill

Summary: layout widgets don't react to browser font-size adjustments correctlylayout widgets don't react to browser font-size adjustments / zoom correctly

comment:20 Changed 8 years ago by bill

Summary: layout widgets don't react to browser font-size adjustments / zoom correctlylayout widgets don't react to browser font-size adjustments correctly

See #13810 for zoom issues.

comment:21 Changed 7 years ago by bill

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 7 years ago by ben hockey

Keywords: needsreview added
Priority: highlow

bill, you seem like you could be convinced to close this. what do you think?

comment:23 Changed 7 years ago by bill

Keywords: needsreview removed
Resolution: wontfix
Status: newclosed

Yah, sure, I'll close; it's a toss up.

Note: See TracTickets for help on using tickets.