Opened 11 years ago

Closed 6 years ago

Last modified 5 years ago

#11739 closed defect (patchwelcome)

dojox.html.metrics.getTextBox() returns wrong height for texts including white-spaces

Reported by: Jan Schatz Owned by: Bryan Forbes
Priority: high Milestone: 1.13
Component: Dojox Version: 1.5
Keywords: Cc: Jan Schatz
Blocked By: Blocking:


Due to the width of the measurement node being fixed to 1 pixel, the text that is to be measured will be wrapped if there are any white-space characters in it. This leads to a wrong text hight being returned. This issue could be fixed by disallowing automatic wrapping for the measurement node: = "nowrap";

Change History (5)

comment:1 Changed 11 years ago by Adam Peller

Milestone: 1.5.1tbd

comment:2 Changed 11 years ago by Adam Peller

Owner: changed from Adam Peller to bryanforbes

comment:3 Changed 11 years ago by bill

Owner: changed from bryanforbes to Bryan Forbes

comment:4 Changed 6 years ago by dylan

Milestone: tbd1.12
Resolution: patchwelcome
Status: newclosed

Given that no one has shown interest in creating a patch in the past 5+ years, I'm closing this as patchwelcome.

comment:5 Changed 5 years ago by jan schatz

I provided a solution in the description text. I thought that would help. I cannot attach files to this ticket. So here is the patch that works for me:

--- dojox/html/metrics.js
+++ dojox/html/
@@ -71,0 +72 @@
+ = "nowrap";
Note: See TracTickets for help on using tickets.