Open pol2095 opened 1 month ago
I can't reproduce your problem on my machine (Windows 11, AIR 32/51), the text is displayed fully including the last sentence:
if the mouse is positioned on the right of the textfield.
I don't understand this. I think you should make a screen record to show your actions.
It depends a bit how the text is wrapped. If you add a few more words so that the final sentence only goes a little in to the line, but the mouse is to the right of this, then it won't display the final line. But if you move your mouse to the left so that it's vertically underneath where the full stop should be, then the final scroll happens.
Seems to be related to the fact that the selections don't actually go to the end of the line (or the start, if you're moving your mouse above the text field), although this particular behaviour does then match notepad (and HTML/Edge, just looking at this editor itself...)
But a fairly easy fix, there are some conditions about the scroll amount vs selection position, but ultimately if you're dragging downwards on a text field, it should always scroll.
FYI we also found that the auto-scroll doesn't properly select the text if you hold the mouse still. So e.g. start a selection at the top of the text field, quickly move your mouse down to below the text field and then stop it moving, the text field should scroll down line by line with the selection expanding to match... but although the scrolling works, the selection doesn't.
Interesting, these problems seem to have been in the TextField control for many many years..?!
thanks
I tried spark.components.TextArea using TLF, it doesn't have this behaviors, but mx.controls.TextArea using flash.text.TextField have the same behaviors.
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
addedToStage="ats(event)">
<fx:Script>
<![CDATA[
private function ats(event:Event):void
{
tlfTextField.text = "ActionScript provides several ways to format your text at runtime. The TextFormat class lets you set character and paragraph formatting for TextField objects. You can apply Cascading Style Sheets (CSS) styles to text fields by using the TextField.styleSheet property and the StyleSheet class. You can use CSS to style built-in HTML tags, define new formatting tags, or apply styles. You can assign HTML formatted text, which optionally uses CSS styles, directly to a text field. HTML text that you assign to a text field can contain embedded media (movie clips, SWF files, GIF files, PNG files, and JPEG files).";
textField.text = "ActionScript provides several ways to format your text at runtime. The TextFormat class lets you set character and paragraph formatting for TextField objects. You can apply Cascading Style Sheets (CSS) styles to text fields by using the TextField.styleSheet property and the StyleSheet class. You can use CSS to style built-in HTML tags, define new formatting tags, or apply styles. You can assign HTML formatted text, which optionally uses CSS styles, directly to a text field. HTML text that you assign to a text field can contain embedded media (movie clips, SWF files, GIF files, PNG files, and JPEG files).";
}
]]>
</fx:Script>
<s:VGroup>
<s:TextArea width="300" height="150" id="tlfTextField"/>
<mx:TextArea width="300" height="150" id="textField"/>
</s:VGroup>
</s:Application>
Problem Description
when I select the text and move the mouse down, the last line is selected but not visible (flash.text.Textfield doesn't scroll to see the last line) if the mouse is positioned on the right of the textfield.
Steps to Reproduce
when I select the text and move the mouse down, the last line is selected but not visible (flash.text.Textfield doesn't scroll to see the last line) if the mouse is positioned on the right of the textfield.
Actual result :![Sans titre](https://github.com/airsdk/Adobe-Runtime-Support/assets/6962232/5f28d59a-8923-4f99-b27a-e25b04c6b7df)
Expected result :![Sans titre2](https://github.com/airsdk/Adobe-Runtime-Support/assets/6962232/e4ed3695-40e5-43c4-ad35-4d37af7433fe)
Known Workarounds
No workaround