Opened 9 years ago

Last modified 2 years ago

#11060 new defect

Editor font size smaller than page when browser set to small font size (FF)

Reported by: Jared Jurkiewicz Owned by: bill
Priority: high Milestone: 1.14
Component: Editor Version: 1.5.0b1
Keywords: Cc:
Blocked By: Blocking:

Description

Claro body theme (common.css) is somehow affecting font-size in the editor iframe

Basically, it is making it smaller. In some cases it is making the text hard to read.

Change History (14)

comment:1 Changed 9 years ago by bill

Component: GeneralDijit
Milestone: tbd1.5
Owner: anonymous deleted

comment:2 Changed 9 years ago by bill

Summary: Claro body theme (common.css) is somehow affecting font-size in the editor iframeClaro body theme (common.css) is somehow affecting font-size in the editor iframe (FF)

It's working fine in IE8 and chrome, seems just to be a FF bug. On FF the font-size becomes 8.9px rather than 11px.

comment:3 Changed 9 years ago by bill

Summary: Claro body theme (common.css) is somehow affecting font-size in the editor iframe (FF)Claro body theme (common.css) is somehow affecting font-size in the editor iframe

Oops, actually I'm not seeing this anymore, even on FF. My comment above was just because I had my zoom (browser setting) set small.

Are you still seeing it?

comment:4 Changed 9 years ago by bill

Summary: Claro body theme (common.css) is somehow affecting font-size in the editor iframeEditor font size smaller than page when browser set to small font size (FF)

Actually, I was able to reproduce this after all. The problem is not limited to claro, although the effect is more noticable there. It does seem to be limited to FF though. It's an issue with getComputedStyle() on FF. The steps to reproduce are:

  1. set FF zoom to make the font small, and check "zoom text only"
  2. load test_Editor.html?theme=claro (or any theme)

At this point what happens is:

  1. the page font size is set to 11px from dojo.css, except that due to the browser zoom setting it's really about 9px
  2. some code in RichText?.js runs to copy the editor.domNode's style to apply to the editor contents:
var _cs = dojo.getComputedStyle(this.domNode);
...
var font = [ _cs.fontWeight, _cs.fontSize, _cs.fontFamily ].join(" ");
...
  1. the getComputedStyle() call returns the actual 9px font size (ie, the size after the browser's zoom has been applied), so the editor's iframe's <body> gets a font: 9px style.
  2. the browser's zoom setting is applied to that 9px, making it about 7px in reality

Also note that this problem is not limited to Editor. InlineEditBox has a similar problem; if you set FF's zoom to a high level and then in themeTester.html, edit the <h3> InlineEditBox, you can see the font get bigger. Same issue.

I'm not sure what to do about this, any ideas? Probably it won't be feasible to fix for 1.5.

comment:5 Changed 9 years ago by Adam Peller

Milestone: 1.51.6

comment:6 Changed 8 years ago by bill

Milestone: 1.61.7

comment:7 Changed 8 years ago by Chris Mitchell

Owner: set to bill

comment:8 Changed 8 years ago by Adam Peller

moved to 1.7.1 for consideration. Please move to 1.8 as appropriate.

comment:9 Changed 8 years ago by Adam Peller

Milestone: 1.71.7.1

actually moving to 1.7.1

comment:10 Changed 8 years ago by bill

Milestone: 1.7.1future

comment:11 Changed 4 years ago by dylan

Component: DijitEditor
Milestone: future1.12

comment:12 Changed 4 years ago by dylan

Milestone: 1.131.12

Moving all Editor tickets to 1.12 for now.

comment:13 Changed 3 years ago by dylan

Milestone: 1.121.13

Ticket planning... move current 1.12 tickets out to 1.13 that likely won't get fixed in 1.12.

comment:14 Changed 2 years ago by dylan

Milestone: 1.131.14
Note: See TracTickets for help on using tickets.