Uploaded image for project: 'Apache Flex'
  1. Apache Flex
  2. FLEX-25199

FTETextField TextBlocks used for justification are initialized incorrectly

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Adobe Flex SDK Previous
    • None
    • Layout - General
    • None
    • Affected OS(s): All OS Platforms
      Language Found: English

    Description

      The code in FTETextField.initClass() has the following code:

      staticTextBlockAllButLast = new TextBlock();
      staticTextBlockAllButLast.textJustifier = new SpaceJustifier("en",LineJustification.ALL_BUT_LAST);

      staticTextBlockUnjustified = new TextBlock();
      staticTextBlockAllButLast.textJustifier = new SpaceJustifier("en",LineJustification.UNJUSTIFIED);

      The last line is an obvious copy-and-paste coding error. Presumably, it should be:

      staticTextBlockUnjustified.textJustifier = new SpaceJustifier("en",LineJustification.UNJUSTIFIED);

      Otherwise, the textJustifier field is wrong for both TextBlocks. The one for "all but last" is being set twice, the second time to the wrong value, and the one for "unjustified" is not being set at all.

      I noticed this while inspecting the code. I don't have an example of incorrect behavior, but it would seem that the text justification would be wrong in many cases.

      Attachments

        Activity

          People

            adobejira Adobe JIRA
            adobejira Adobe JIRA
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: