Text wrapping bug in TextField
we use textfield control extensively in our app. has issue text wrapping causes app go in infinite layout cycle.
this problem occurs because text wrapping algorithm makes textfield height different in each rendering cycle.
this problem not reproducible in ide in debug mode. occurs in installed .air app.
steps reproduce:
1) make adobe air project , paste code below in main mxml file.
2) generate .air installer
3) install app
4) click in textfield
5) move mouse outside textfield( remain within app).
6) note. textfield textwrapping goes in cycle confused , textfield height differnt in each rendering cycle.
system configuration
adobe air version 3.7.0.1530
flash player: 11.5.502.110
mac os 10.7.5 (64-bit)
2.2 ghz core i7
4gb ram
please click .gif file view issue.
sample air app code
<?xml version="1.0" encoding="utf-8"?>
<mx:windowedapplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationcomplete="windowedapplication1_creationcompletehandler(event)">
<mx:script>
<![cdata[
import mx.core.uicomponent;
import mx.core.uitextfield;
import mx.events.flexevent;
private var wrapper:uicomponent;
private var infofield:textfield;
protected function windowedapplication1_creationcompletehandler(event:flexevent):void
{
wrapper = new uicomponent();
addchild(wrapper);
infofield= new textfield();
infofield.autosize=textfieldautosize.left;
infofield.multiline=true;
infofield.wordwrap=true;
infofield.selectable = true;
infofield.border = true;
infofield.x = 100;
infofield.y = 20;
wrapper.addchild( infofield );
infofield.htmltext = '<textformat leading="0"><font face="arial" color="#0" size="13"><p align="left">hi,</p><p align="left">nvidia geforce 9400m 256 mb graphics</p><p align="left">i believe issue convo adobe air app. other air apps before it, convo causes computer slow crawl during daily use, , tends make fans turn on nonstop until quite app.</p></font></textformat>';
infofield.width = 259;
}
]]>
</mx:script>
</mx:windowedapplication>
thank heads up. please copy on our bugbase.adobe.com bug database? if possible, prebuilt example reproduce problem. once added, please post bug url others effected can add comments , votes.
More discussions in AIR Bugs and Performance Issues
adobe

Comments
Post a Comment