[Laszlo-dev] For Review: Change 20081230-maxcarlson-5 Summary: Re-select text when focus is lost by clicking lon an unfocusable element (swf8 only)
André Bargull
andre.bargull at udo.edu
Fri Jan 2 09:56:14 PST 2009
Not approved.
1) At general, I'd like to propose to add an attribute which defines how
selection should be handled, because IMO this feels like a big change in
L&F of inputtexts and some users may prefer that selection is cleared as
soon as e.g. the window is dragged (in the testcase).
2) The new behaviour doesn't really reflect DHTML, for example click on
the inputtext and then on the canvas: in dhtml, selection is cleared,
whereas in swf8, the selection will be recreated.
3) And in my opinion, it looks like a defect when the selection is
recreated on "onmouseup", because there is no selection when you drag
the window around, but only after releasing the mouse-button you'll get
the previous text selection. I'd prefer either no recreation at all or
continuous selection (as in dhtml).
4) Scrolling for multiline texts (as in the debug-window) is broken.
Click on edittext, inspect the debug-message and then try to scroll with
arrow-buttons to the top. (You can use the testcase below.)
5) And finally, the general focusing is broken. If you add a handler to
onfocus on lz.Focus, you'll get this output in swf8:
> new focus on .field
> new focus on null
> new focus on .field
But in dhtml, it justs:
> new focus on .field
testcase:
<canvas>
<edittext text="... or me" width="350" />
<handler name="onfocus" args="f" reference="lz.Focus" >
Debug.write("new focus on %w", f);
</handler>
</canvas>
On 12/31/2008 7:37 AM, Max Carlson wrote:
> Change 20081230-maxcarlson-5 by maxcarlson at Bank.lan on 2008-12-30
> 22:29:47 PST
> in /Users/maxcarlson/openlaszlo/trunk-clean
> for http://svn.openlaszlo.org/openlaszlo/trunk
>
> Summary: Re-select text when focus is lost by clicking lon an
> unfocusable element (swf8 only)
>
> Bugs Fixed: LPP-6790 - Seleted text should not be deselected when user
> clicks elsewhere on application
>
> Technical Reviewer: andre.bargull at udo.edu
> QA Reviewer: akarlovac
>
> Details: swf/LzTextSprite.as - Remove duplicate event sent for
> setXScroll(). Use view.resourceevent() instead of calling sendEvent()
> directly.
>
> swf/LzMouseKernel.as - Store a reference to the last selected text when
> caching the selection. Restore the selection onmouseup for
> non-focusable views. Don't restore the selection onmouseup for
> focusable views.
>
> dhtml/LzTextSprite.js - Use view.resourceevent() instead of calling
> sendEvent() directly.
>
> swf9/LzTextSprite.js - Use view.resourceevent() instead of calling
> sendEvent() directly.
>
> Tests: See LPP-6790. Clicked debugger messages continue to work across
> all runtimes.
>
> Files:
> M WEB-INF/lps/lfc/kernel/swf/LzTextSprite.as
> M WEB-INF/lps/lfc/kernel/swf/LzMouseKernel.as
> M WEB-INF/lps/lfc/kernel/dhtml/LzTextSprite.js
> M WEB-INF/lps/lfc/kernel/swf9/LzTextSprite.as
>
> Changeset:
> http://svn.openlaszlo.org/openlaszlo/patches/20081230-maxcarlson-5.tar
>
More information about the Laszlo-dev
mailing list