Closed
Bug 20387
Opened 25 years ago
Closed 25 years ago
scroll bars appearing in single line text control (scrollbars)
Categories
(Core :: Layout: Form Controls, defect, P2)
Core
Layout: Form Controls
Tracking
()
VERIFIED
FIXED
M14
People
(Reporter: buster, Assigned: kinmoz)
References
Details
after the switch to gfx text controls, vertical scroll bars started showing up
in single line text controls after they get focus.
Updated•25 years ago
|
Assignee: rods → buster
Comment 1•25 years ago
|
||
Looks like a gfx scrollbar issue
this only happens in empty text controls.
The problem seems to be that when we delete the last character in a text
control, we get this content model:
body@01F1C62C style=font-family: -moz-fixed; background-color: rgb(255,255,255)
white-space: pre; refcount=19<
br@01F8AE5C refcount=4<>
Text@01F8D760 refcount=16<>
>
The layout system creates 2 lines for this, instead of just 1, so the subdoc is
1 line taller than it should be, hence the sroll bar.
I thought we had code in the editor that went through and removed empty text
nodes from the content tree as a post process to delete. Joe, if you point me
to this code, I'll see why we're getting the extra empty node. I did find the
code that collapses adjacent text nodes, but that code doesn't do anything
special if the two nodes being collapsed are both empty. Maybe it should just
delete them?
Comment 9•25 years ago
|
||
I've talked with steve about this. Now he gets to play with the fire that is
nsTextEditRules::AfterEdit(). Be very afraid.
Reporter | ||
Comment 10•25 years ago
|
||
*** Bug 22147 has been marked as a duplicate of this bug. ***
Reporter | ||
Comment 11•25 years ago
|
||
turns out I only have part of the fix. The fix I have seems to work for text
controls in HTML content, but not in XUL. I don't yet understand why there is a
difference. I'm investigating.
Dev note: The subdoc height is 210, the BR height is 240, the line height in
300. See nsLineLayout.cpp line 1546,
nscoord lineHeight = psd->mMaxY - psd->mMinY; // ((45)-(-210))
maybe if the vert alignment were set to bottom, it would work?
Reporter | ||
Comment 12•25 years ago
|
||
Reporter | ||
Comment 13•25 years ago
|
||
I will check in the tiny editor fix that removes empty text controls when
the bogus BR node is created. This was causing the the document to have 2 lines,
making it too tall and invoking the vertical scroll bar. This fixes this
problem in default (no CSS style) text controls. But Kin is working on a fix
that solves the problem even when CSS makes the interior subdocument shorter
than the content, as can be done with CSS (all default text controls in XUL
exhibit this today.) That is bug 12825.
Assignee | ||
Comment 14•25 years ago
|
||
Accepting bug.
Comment 15•25 years ago
|
||
*** Bug 22460 has been marked as a duplicate of this bug. ***
Comment 16•25 years ago
|
||
*** Bug 22771 has been marked as a duplicate of this bug. ***
Comment 17•25 years ago
|
||
*** Bug 22756 has been marked as a duplicate of this bug. ***
Updated•25 years ago
|
OS: Windows NT → All
Hardware: PC → All
Comment 18•25 years ago
|
||
migrating over platform information from duplicate bug 22756.
Comment 19•25 years ago
|
||
*** Bug 23143 has been marked as a duplicate of this bug. ***
Reporter | ||
Comment 20•25 years ago
|
||
*** Bug 20342 has been marked as a duplicate of this bug. ***
Assignee | ||
Comment 21•25 years ago
|
||
*** Bug 24009 has been marked as a duplicate of this bug. ***
Comment 22•25 years ago
|
||
I suggest you take the space out of "scroll bars" in the Summary to make this
bug more visible to searches.
Summary: scroll bars appearing in single line text control → scrollbars appearing in single line text control
Assignee | ||
Comment 23•25 years ago
|
||
Modified summary so that "scroll bars" doesn't have a space.
Updated•25 years ago
|
Summary: scrollbars appearing in single line text control → scroll bars appearing in single line text control (scrollbars)
Assignee | ||
Comment 24•25 years ago
|
||
I'm working on this right now, but I don't think I'll make tonight's M13
midnight deadline. Moving to M14 since it isn't an M13 stopper.
Comment 25•25 years ago
|
||
*** Bug 23598 has been marked as a duplicate of this bug. ***
Comment 26•25 years ago
|
||
*** Bug 25316 has been marked as a duplicate of this bug. ***
Whiteboard: Fix in hand. Reviewed by buster@netscape.com. Will checkin soon.
Assignee | ||
Comment 27•25 years ago
|
||
Fix checked in:
mozilla/layout/html/forms/src/nsGfxTextControlFrame.cpp revision 3.132
mozilla/layout/html/forms/src/nsGfxTextControlFrame.h revision 3.51
r=buster@netscape.com
Fix should appear in 02/02/2000 8am builds.
Assignee | ||
Comment 28•25 years ago
|
||
Marking fixed. Clearing status whiteboard.
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Whiteboard: Fix in hand. Reviewed by buster@netscape.com. Will checkin soon.
Assignee | ||
Comment 29•25 years ago
|
||
*** Bug 26180 has been marked as a duplicate of this bug. ***
Assignee | ||
Comment 30•25 years ago
|
||
*** Bug 26951 has been marked as a duplicate of this bug. ***
Comment 31•25 years ago
|
||
*** Bug 27074 has been marked as a duplicate of this bug. ***
You need to log in
before you can comment on or make changes to this bug.
Description
•