#16642: [regression] BTextControl: broken horizontal scroll when text don't fit
text field
---------------------------------+----------------------------
Reporter: X512 | Owner: nobody
Type: bug | Status: new
Priority: normal | Milestone: Unscheduled
Component: Kits/Interface Kit | Version: R1/Development
Resolution: | Keywords:
Blocked By: | Blocking:
Platform: All |
---------------------------------+----------------------------
Comment (by jscipione):
This is not a bug, this behavior was added intentionally, let me try to
explain.
The behavior described in this ticket is here:
https://git.haiku-os.org/haiku/tree/src/kits/interface/TextView.cpp#n2172
When the text in the text view is wide enough that it does not fit in the
text view box an extra 1/2 text view of space is added on. You are allowed
to scroll the text horizontally to both positive (after the end) and
negative (before the beginning) values. This was done so that when you
type more characters then will fit in the box, you may scroll the text
while still seeing some of the previous text.
Before this change when you added more text than would fit in the box it
would hide all of the previous text from view and create a new "page" of
text not allowing you to see any of the text in the previous page.
What you are showing in this ticket as a bug is that you are allowed to
scroll past the beginning of the text when it doesn't fit. This might look
odd, but this was done so that you have some extra space to scroll in
allowing at least some of the text to remain on screen.
If some corrective change to this behavior is desired, the way to do it is
to alter the extraSpace variable. If extraSpace is set to 0 then the text
view will allow you to scroll to the beginning and end of the text only,
but, that will also hide all previously entered text when you overflow.
Perhaps reducing from 1/2 width to 1/4 width would make the extra
scrolling space appear more reasonable.
The mouse button scrolling part might still be a bug though.
--
Ticket URL: <https://dev.haiku-os.org/ticket/16642#comment:3>
Haiku <https://dev.haiku-os.org>
The Haiku operating system.