[Laszlo-dev] For Review: Change 20090602-maxcarlson-i Summary: Fix IE to select inputtexts that share the same area as a text

Henry Minsky hminsky at laszlosystems.com
Wed Jun 3 18:42:27 PDT 2009


approved!

One question, in the code for LzInputTextSprite.prototype.__hideIfNotFocused


 if (quirks.textgrabsinputtextfocus) {
            var s = window.event;
            if (s && s.srcElement && s.srcElement.owner &&
s.srcElement.owner instanceof LzTextSprite) {
                //Debug.write('text intercepting focus', eventname, s.owner
instanceof LzTextSprite);
                if (eventname == 'onmousedown') {
                    if (lzinppr.__lastshown) lzinppr.__lastshown.gotFocus();
                }
                return;
            }

Wouldn't __lastshown always be non-null, because that case was checked for
that
case at the start of the method? Or does something within __hideIfNotFocused
possibly unset that value?



On Tue, Jun 2, 2009 at 7:47 PM, Max Carlson <max at openlaszlo.org> wrote:

> Change 20090602-maxcarlson-i by maxcarlson at Bank on 2009-06-02 16:37:12 PDT
>    in /Users/maxcarlson/openlaszlo/trunk-clean
>    for http://svn.openlaszlo.org/openlaszlo/trunk
>
> Summary: Fix IE to select inputtexts that share the same area as a text
>
> Bugs Fixed: LPP-8219 - IE DHTML: inputtext focus/selection issues
>
> Technical Reviewer: hminsky
> QA Reviewer: mdemmon
>
> Details: LzSprite - Add textgrabsinputtextfocus quirk, set to true for IE.
>
> LzInputTextSprite - __hideIfNotFocused():  Shorten lookups to
> LzInputTextSprite.prototype.  Look at the srcElement of the last event to
> see if it was an instance of LzTextSprite - this happens when an text is in
> the same area as an inputtext.  If this is the case, focus the inputtext and
> avoid hiding the shown inputtext.
>
> Tests: Testcase from LPP-8219 and compose window in webtop mail allows the
> to: field to be selected in the area that says 'Drag a contact or type for
> autosuggest'.
>
> Files:
> M      WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js
> M      WEB-INF/lps/lfc/kernel/dhtml/LzInputTextSprite.js
>
> Changeset:
> http://svn.openlaszlo.org/openlaszlo/patches/20090602-maxcarlson-i.tar
>



-- 
Henry Minsky
Software Architect
hminsky at laszlosystems.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.openlaszlo.org/pipermail/laszlo-dev/attachments/20090603/367d0cf7/attachment.html


More information about the Laszlo-dev mailing list