#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: |
Description
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: m.style.whiteSpace = "nowrap";
Change History (5)
comment:1 Changed 10 years ago by
Milestone: | 1.5.1 → tbd |
---|
comment:2 Changed 10 years ago by
Owner: | changed from Adam Peller to bryanforbes |
---|
comment:3 Changed 10 years ago by
Owner: | changed from bryanforbes to Bryan Forbes |
---|
comment:4 Changed 5 years ago by
Milestone: | tbd → 1.12 |
---|---|
Resolution: | → patchwelcome |
Status: | new → closed |
comment:5 Changed 4 years ago by
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/metrics.new.js @@ -71,0 +72 @@ + m.style.whiteSpace = "nowrap";
Note: See
TracTickets for help on using
tickets.
Given that no one has shown interest in creating a patch in the past 5+ years, I'm closing this as patchwelcome.