[ 
https://issues.apache.org/jira/browse/FLEX-24257?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13686096#comment-13686096
 ] 

Maurice Amsellem commented on FLEX-24257:
-----------------------------------------

After investigating further, I think I understand where the cause of the issue.
Actually, when TextInput or DateField gets the focus, it will select the text 
that is displayed   (textField.setSelection(0, textField.length))
When the text is too "tight fitted" in the Input Field, FlashPlayer will scroll 
it 20 pixels to the right.

In the example above, the default measured width for the textInput will be 70 
pixels.
If you force the width to 71 pixels, scrolling does not happen any more.

Easy workaround that worked for me is just to set paddingRight="1".

So maybe the fix would be to increase the default width for the inner text 
field by 1 pixel  in the measure() function.

Hope this helps

Note: My OS is French,  Windows 7, using FP 11.7

                
> DateField text scrolled when pressing DateField calendar button
> ---------------------------------------------------------------
>
>                 Key: FLEX-24257
>                 URL: https://issues.apache.org/jira/browse/FLEX-24257
>             Project: Apache Flex
>          Issue Type: Bug
>          Components: mx: DateField
>    Affects Versions: Adobe Flex SDK 3.2 (Release)
>         Environment: Affected OS(s): Windows
> Affected OS(s): Windows 7
> Browser: Internet Explorer 8.x
> Language Found: English
>            Reporter: Adobe JIRA
>         Attachments: screenshot-1.jpg
>
>
> Steps to reproduce:
> 1. Click on an editable DateField's calendar button when the DateField 
> doesn't currently have focus.
> 2. Observe the text in the DateField's textinput area.
>  
>  Actual Results:
> The text is automatically highlighted and scrolled to the left such that the 
> beginning part of the date text isn't visible. 
>  
>  Expected Results:
> The text should not be highlighted or scrolled at all. 
>  
>  Workaround (if any):
> Click in the textinput area before pressing the button.
>  
> Sample app:
> <?xml version="1.0" encoding="utf-8"?>
> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"; layout="vertical">
>       <mx:DateField editable="true"/>
> </mx:Application>
> I see this on Flex SDK 3.2, 3.4 and 4.0.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to