Opened 12 years ago
Closed 12 years ago
#11073 closed defect (fixed)
dojox.html.metrics generates huge scroller if text in metrics calc box is long
Reported by: | Jared Jurkiewicz | Owned by: | Jared Jurkiewicz |
---|---|---|---|
Priority: | high | Milestone: | 1.5 |
Component: | Dojox | Version: | 1.5.0b1 |
Keywords: | Cc: | Eugene Lazutkin | |
Blocked By: | Blocking: |
Description (last modified by )
This is because it has to be in the page to calc size, but by being in the page can affect width of the body. Simple 'fix' is to contain it withing a fixed width/height div.
Incoming testcase as well as patch.
Attachments (2)
Change History (10)
comment:1 Changed 12 years ago by
Description: | modified (diff) |
---|---|
Summary: | dojox.html.metrics generates huge scroller if test in metrics calc box is long → dojox.html.metrics generates huge scroller if text in metrics calc box is long |
Changed 12 years ago by
Attachment: | test_TextBox.html added |
---|
Changed 12 years ago by
Attachment: | metrics.patch added |
---|
comment:2 Changed 12 years ago by
Cc: | Eugene Lazutkin added |
---|---|
Owner: | changed from uhop to Jared Jurkiewicz |
comment:3 follow-up: 4 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:4 Changed 12 years ago by
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Replying to jaredj:
(In [22022]) Fixing issue with getTextBox causing scrollbar to appear on body. fixes #11073
This change doesn't work for me --- w
is always 1. Specifically the line 104 could be wrong --- are you sure that
box.w = m.parentNode.scrollWidth;
is correct?
Why not:
box.w = m.scrollWidth;
The former is always 1 for me (using Chrome) and the latter looks like a real value.
comment:5 Changed 12 years ago by
comment:6 Changed 12 years ago by
I couldn't reproduce the problem at home with any browser. I'll try it again tomorrow at work --- it might be CSS-specific, or just plain old bug in a browser.
In any case I added a missing test case for getTextBox()
in [22881].
comment:7 Changed 12 years ago by
The test is working for me in chrome. I only vaguely remember why I looked at the parent node. Had to do with checking how wide the scroll area of the container wrapping the text was.
comment:8 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
The reason was a tricky CSS class (in the Grid component), which sets height: 0
. Apparently it was enough to interpret that the text is never shown.
Test demonstrating the issue