Given past responses from the list, suspect this fell between the cracks.
Resending in the hope that it'll get noticed this time.
Thanks for any help.
-shishir
On Jan 6, 2008 1:55 PM, Shishir Ramam <[EMAIL PROTECTED]> wrote:
>
> It seems with resizable multiline inputText, when we use either enter or
> backspace to add/remove newlines,
> no new character is sensed - specifically, no 'ontext' event is generated.
>
>
> The following sample is a working example that illustrates the issue.
>
> Click on the gray box and the following character sequence shows the issue
> with
> newlines not being sent to the ontext event.
>
> aaaa<enter>
> a<backspace><backspace>a
>
> My expectation -
> 1. The <enter> adds a newline to the text and generate an 'ontext' event -
> and the inputtext view to be resized.
> 2. The second backspace deletes the newline added & generate another
> 'ontext' event and therefore a resize.
>
> However, in both cases, it's the first text modification around the
> newline that results in a change and triggering
> the expected behaviour. That is the 'a' after <enter> and the 'a' after
> the second <backspace> cause the
> desired resize.
>
> I didn't find anything obvious on jira. Am I missing something?
> Would appreciate any help I can get understanding what the issue is and if
> I can solve this.
>
> I am using 4.0.7 on windows (vista) + firefox + swf7.
> -shishir
>
>
> <canvas>
> <inputtext multiline='true' resizable='true'
> x='20' y='20' width='10' height='16' bgcolor='#DDDDDD'>
>
> <method name="setSize" >
> setWidth((getTextWidth() > 0)?(getTextWidth()+5):100);
> setHeight((getTextHeight() > 0)?(getTextHeight()+5):16);
> Debug.write('new height - ' + getTextHeight() + ' ' + getHeight());
> </method>
>
> <handler name="ontext">
> setSize('false');
> </handler>
>
> <method name="resize_add" args="d">
> Debug.write ('text after enter' + getText());
> setSize('true');
> </method>
>
> <method name="resize_del" args="d">
> Debug.write('text after backspace' + getText());
> setSize('false');
> </method>
>
> <handler name="oninit">
> var resize_add = new LzDelegate(this, "resize_add");
> var resize_del = new LzDelegate(this, "resize_del");
> LzKeys.callOnKeyCombo(resize_add, ['enter']);
> LzKeys.callOnKeyCombo(resize_del, ['backspace']);
> // set focus to the newly created inputbox after creation
> onfocus.sendEvent ();
> </handler>
> </inputtext>
> </canvas>
>
>
--
"One thing I feel most passionately about: love of invention will never
die."
-Karl Benz