Change 20100318-hqm-F by [email protected] on 2010-03-18 11:12:32 EDT
    in /Users/hqm/openlaszlo/trunk
    for http://svn.openlaszlo.org/openlaszlo/trunk

Summary:  fix for automatic height sizing of multiline text fields

New Features:

Bugs Fixed: LPP-8591 

Technical Reviewer: ptw
QA Reviewer: max
Doc Reviewer: (pending)

Documentation:

Release Notes:

Overview:
    
This fixes a bug where autosizing multiline text fields whose content height 
changes are 
improperly forcing hassetheight to true.

[This fix does not address the original issue in the bug report, where there 
the scrollHeight updating
needs be forced. I should probably have created a new JIRA bug for  this fix ]



When a multiline text field which is resizable (hassetheight == false)
gets a content-changed event, this updates the height without
resetting the hassetheight flag.




Details:

LzText.lzs: created a new method "installHeight" which sets the sprite height, 
but
does not side effect hassetheight flag

LzText, LzInputText: call installHeight instead of the $lzc$set_height setter 
when 
setting view height to it's text content height.    

Note: there is still some bug remaining with measuring the size of a DHTML 
textfield, but
that existed before this fix.

Tests:

smokecheck 
lzpix demo
test/lfc/maxscroll.lzx 

test case below, the bounding box should expand vertically to just enclose the 
text as you
type. 

<canvas>
        <inputtext width="100"  
                   bgcolor="#cccccc"  
                   multiline="true">Hey there! This text should wrap onto a few 
lines.
        </inputtext>
</canvas>

Files:
M       WEB-INF/lps/lfc/views/LzInputText.lzs
M       WEB-INF/lps/lfc/views/LzText.lzs


Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20100318-hqm-F.tar

Reply via email to