We should adopt the convention of using a timeout of 0 for these kind of
callbacks, rather than 1 (or any other small number). The point is for the
callback to be called when the current thread returns, equivalent to the idle
loop or vblank of video game days; the point is _not_ to call it 1ms later.
Using 1 instead of 0 just obscures that point.
On 2010-08-05, at 11:50, Henry Minsky wrote:
> Approved!
>
> Thanks for discovering that adobe focus bug.
>
> There's a conflict with this change and the last change I checked into swf9
> LzInputTextSprite, I had removed the setTimeout delay in the call to
> __handleLostFocus , because I didn't think we needed it
> anymore. I'm not sure if that is still necessary
>
> function __lostFocus (event:FocusEvent) :void {
> + // defer execution, see swf8 kernel
> + LzTimeKernel.setTimeout(this.__handlelostFocus, 1, event);
>
>
> On Thu, Aug 5, 2010 at 11:22 AM, André Bargull <[email protected]>wrote:
>
>> Change 20100805-bargull-LmW by barg...@bargull02 on 2010-08-05 17:06:57
>> in /home/anba/src/svn/openlaszlo/trunk
>> for http://svn.openlaszlo.org/openlaszlo/trunk
>>
>> Summary: handle premature loss of focus for inputtext
>>
>> Bugs Fixed: LPP-9170 (inputtext can have cursor and allow input without
>> focus on it)
>>
>> Technical Reviewer: henry
>> QA Reviewer: max
>>
>> Details:
>> LzInputText:
>> - calling lz.setFocus() doesn't ensure the focus will actually change,
>> handle this case in inputtextevent()
>> - changed lzxtype from booleanLiteral to boolean which is the proper type
>> LzInputTextSprite:
>> - implement workaround for flash player bug FP-5021
>> LzFocus:
>> - changed if statement so it triggers conditional compilation
>>
>>
>> Tests:
>> testcase from bugreport (swf8, swf10, dhtml [Firefox, IE, Safari, except
>> Opera - but mouse-events are currently broken in Opera, so it's difficult to
>> test in this case])
>>
>> Files:
>> M WEB-INF/lps/lfc/kernel/swf/LzInputTextSprite.as
>> M WEB-INF/lps/lfc/kernel/swf9/LzInputTextSprite.as
>> M WEB-INF/lps/lfc/services/LzFocus.lzs
>> M WEB-INF/lps/lfc/views/LzInputText.lzs
>>
>> Changeset:
>> http://svn.openlaszlo.org/openlaszlo/patches/20100805-bargull-LmW.tar
>>
>>
>
>
> --
> Henry Minsky
> Software Architect
> [email protected]