[
https://issues.apache.org/jira/browse/FLEX-24257?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13688235#comment-13688235
]
Maurice Amsellem commented on FLEX-24257:
-----------------------------------------
I think I understood where the computation error is:
in TextInput, the measured width is :
measuredWidth = textWidth + 8 + paddingLeft + paddingRight
(paddingLeft = 2, and paddingRight = 2)
eg. for "06/19/2013", that gives 62+8+2+2 = 74
Now in DateField, the inner TextInput should receive the same width, but it's
not the case:
measuredWidth = maxTextWidth + 8 + gap + buttonWidth+ paddingLeft + paddingRight
but here paddingLeft and paddingRight are those of the DateField, not TextInput
, so they equal 0
measuredWidth= 62 + 8 + 2 + 23 + 0 + 0 = 95;
Then in updateDisplayList, textField receives:
textInput.setActualSize(w - arrowWidth - gap
As you can see, the TI paddings are missing from the calculations, the widht is
4 pixels less than what it should be.
What do you think ?
> 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
> Assignee: Justin Mclean
> Fix For: Apache Flex 4.10.0
>
> Attachments: screenshot-1.jpg, screenshot-2.jpg, screenshot-3.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