1 Reply Latest reply on Jun 14, 2010 2:20 PM by GordonSmith

    Flex Bug with <li></li>?

    martyhovey

      When I run this code and click the link all of my text is bulleted even though there are no <li> tags in the string?

       

      <?xml version="1.0" encoding="utf-8"?>

      <mx:Application

       

       

      xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">

       

       

      <mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" width="455" height="300" cornerRadius="15" borderStyle="solid" backgroundColor="#1D86C7" borderColor="#1D86C7" creationComplete="init()">

       

       

      <mx:Script>

      <![CDATA[

       

       

      import mx.controls.Alert;

       

      import mx.controls.TextArea;

       

      import flash.events.TextEvent;

       

      public var strContent1:String = 'Text, no bullet no link<br>Text, no bullet no link<br><li><a href="event:test">Text Link</a></li><li>Text, bullet, no link</li>';

       

      public var strContent2:String = 'Text, no bullet no link<br>Text, no bullet no link<br>Text, no bullet no link<br>';

       

      public function init():void

      {

      Application.application.contentHolder.htmlText = strContent1;

      }

       

       

      public function linkHandler(e:TextEvent):void

      {

      Application.application.contentHolder.htmlText =

      "";

      Application.application.contentHolder.htmlText = strContent2;

      }

      ]]>

       

      </mx:Script>

       

      <mx:Canvas left="5" right="5" top="5" bottom="5" id="longTextContainer">

       

      <mx:TextArea id="contentHolder" backgroundAlpha="0" borderThickness="0" color="#ffffff" left="5" top="5" right="5" bottom="5" editable="false" horizontalScrollPolicy="off" htmlText="mx:htmlText..." link="linkHandler(event)"/>

       

      </mx:Canvas>

      </mx:Canvas>

      </mx:Application>