| Summary: | Button text unexpectedly wraps in Firefox 4 on some machines | ||
|---|---|---|---|
| Product: | [RT] RAP | Reporter: | Tim Buschtoens <tbuschto> |
| Component: | RWT | Assignee: | Project Inbox <rap-inbox> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | tbuschto |
| Version: | 1.4 | ||
| Target Milestone: | 1.4 M7 | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
|
Description
Tim Buschtoens
The reason is that the computeTextSize function returns smaller values (in our test case 72, compared to 74 on the other machine), even with exactly the same font and string. The function uses scrollWidth/scrollHeight, wich only returns whole numbers. Using getBoundingClientRect() returns 72.25 (still 74 on the other machine). When rounding that up with Math.ceil, the text does not wrap anymore. For now using getBoundingClientRect() and Math.ceil solves the issue and works fine on all browser. Fixed in CVS HEAD. Since there was one red js-test in IE9, i implented the alternative computation method only for gecko browser. |