Opened 12 years ago
Closed 11 years ago
#9092 closed defect (fixed)
Editor lineHeight not set correctly in IE
Reported by: | rmaccracken | Owned by: | Jared Jurkiewicz |
---|---|---|---|
Priority: | high | Milestone: | 1.4 |
Component: | Editor | Version: | 1.3.0 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
In RichText.js, you will find the following code:
var lineHeight = _cs.lineHeight; if(lineHeight.indexOf("px") >= 0){ lineHeight = parseFloat(lineHeight)/parseFloat(_cs.fontSize); }else if(lineHeight.indexOf("em")>=0){ lineHeight = parseFloat(lineHeight); }else { lineHeight = "1.0"; }
The last line (setting lineHeight to "1.0") seems to cause a problem with IE7 and IE8 (and maybe others) as it does not show up as a CSS rule (using new IE8 developer tools). This then causes a problem with the bottom of text being chopped off for letters like 'j' and 'g'.
To fix the problem all I did was add a condition to the last else clause:
} else if (!lineHeight) {
I don't know if that is the absolutely correct fix, but it worked for me. In IE8, the lineHeight variable is initially equal to "normal", so leaving it alone seems to solve the problem.
You can see this problem using the attached file or at the Dojo Campus docs: http://docs.dojocampus.org/dijit/Editor.
Attachments (1)
Change History (5)
Changed 12 years ago by
comment:1 Changed 11 years ago by
Milestone: | tbd → future |
---|---|
Owner: | liucougar deleted |
comment:2 Changed 11 years ago by
Milestone: | future → 1.4 |
---|---|
Owner: | set to Jared Jurkiewicz |
comment:4 Changed 11 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Test case