[Laszlo-dev] __updatefieldsize() for 'onkeypress'
P T Withington
ptw at pobox.com
Wed Mar 18 05:21:37 PDT 2009
Also, LzView/maxlength defaults to Infinity, so the last clause will
always be true.
On 2009-03-18, at 05:59EDT, André Bargull wrote:
> If that's the case, a separate if-statement needs to be used..
>
>
> On 3/18/2009 3:00 AM, Max Carlson wrote:
>> I'm not sure about the sprite.restrict part, but my original intent
>> was to have multiline inputtext fields update their scroll
>> properties when typed into.
>> André Bargull wrote:
>>> In "LzInputTextSprite.prototype.__textEvent":
>>> ---
>>> } else if (eventname == 'onkeypress') {
>>> if (sprite.restrict || (sprite.multiline && view.maxlength >
>>> 0)) {
>>> sprite.__updatefieldsize();
>>> ---
>>>
>>> "__updatefieldsize()" is only called for "onkeypress" if the
>>> inputtext has got a pattern (sprite.restrict) or if it's multiline
>>> and maxlength was specified? I don't understand that logic.
>>> And it doesn't really match the svn message:
>>>> Update the field size metrics onkeypress.
>>>
>>>
>>> ------------------------------------------------------------------------
>>> r12785 | max | 2009-02-07 15:53:13 +0100 (Sat, 07. Feb 2009) | 22
>>> lines
>>> Ge?\195?\164nderte Pfade:
>>> M /openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/
>>> LzInputTextSprite.js
>>> M /openlaszlo/trunk/lps/components/incubator/scrolledittext.lzx
>>> M /openlaszlo/trunk/lps/components/incubator/test/scrolledittext-
>>> test.lzx
>>>
>>> Change 20090206-maxcarlson-Q by maxcarlson at Bank.local on
>>> 2009-02-06 06:43:58 PST
>>> in /Users/maxcarlson/openlaszlo/trunk-clean
>>> for http://svn.openlaszlo.org/openlaszlo/trunk
>>>
>>> Summary: Fix runtime setMultiline() and scrolledittext sizing in
>>> DHTML
>>>
>>> Bugs Fixed: LPP-6580 scrolledittext doesn't work in 4.1
>>> (partial), LPP-7726 - DHTML: setMultiline() has no effect after
>>> init time
>>>
>>> Technical Reviewer: ptw
>>> QA Reviewer: hminsky
>>>
>>> Documentation: LzInputTextSprite - Refactor inputtext div
>>> initialization to separate method, call when creating an
>>> inputtext, or when the mu
>>> ltiline state changes in setMultiline(). Update the field size
>>> metrics onkeypress.
>>>
>>> scrolledittext - Use constraints instead of
>>> applyConstraintMethod() for maintaining height/width.
>>>
>>> scrolledittext-test - Uncomment second scrolledittext, use default
>>> scrollbar class to test functionality.
>>>
>>> Details: This makes scrolledittext begin working in DHTML, with
>>> some issues. Sometimes, the scroll attribute assertion is
>>> triggered, and ma
>>> xscroll doesn't seem to be tall enough. Also, typing carriage
>>> returns into the inputtext doesn't cause it to automatically
>>> scroll down when
>>> typing into the bottom of the field like it does with native
>>> scrollbars - the scrollTop/scroll doesn't change. I'm not sure
>>> how to fix thi
>>> s because AFAIK there's no way to accurately figure out the cursor
>>> pixel offset when typing and set it manually - maybe Tucker has a
>>> clue...
>>>
>>>
>>> Tests: scrolledittext-test runs as before in swf8/9, and now
>>> (almost) works in DHTML.
>>>
>>> ------------------------------------------------------------------------
More information about the Laszlo-dev
mailing list