It's not that we're ignoring the click - the ignore fields prevent the resulting onfocus/blur events from propagating into the LFC/view system.
There are times when the LFC sends the focus event - e.g. Lz.focus.setFocus(view). In these cases, we were avoiding sending the onfocus/blur events to be consistent with the swf runtime(s). This change resets the ignore fields to make sure they're only set when they need to be - when the LFC causes an 'artificial' focus/blur event to be sent. Firefox has issues setting the focus when the DOM is being manipulated - see r13162/r13671 or LPP-7786 (It takes two clicks to get focus into an edittext/inputtext in DHTML) for more details. I believe this change corrects an edge case related to these fixes. I hope this clarifies things! P T Withington wrote: > You're fixing a bug where the user wants to click in a field to set > focus but we were ignoring the click. > > You seem to be telling me we were intentionally ignoring user clicks > that would set focus. > > Your fixing the bug by overriding the ignoring of the click. > > So, I don't get why we were ignoring the click in the first place? > > What am I missing? > > On 2009-07-10, at 16:57EDT, Max Carlson wrote: > >> Onfocus is sent when the user clicks on or tabs into a field - in >> other words, for events that aren't generated by the LFC. >> >> -----Original Message----- >> From: P T Withington <[email protected]> >> Sent: Friday, July 10, 2009 1:44 PM >> To: Max Carlson <[email protected]> >> Cc: [email protected]; [email protected] >> Subject: Re: For Review: Change 20090710-maxcarlson-4 Summary: Fix >> inputtext focusing issues in firefox >> >> On 2009-07-10, at 16:30EDT, Max Carlson wrote: >> >>> P T Withington wrote: >>>> So we cancel cancelling focus if we really mean for focus to focus? >>> >>> Yes, that seems to make the difference. >>> >>>> Remind me what the purpose of _cancelfocus is in the first place? >>> >>> They are used to avoid sending spurious onblur/onfocus events to the >>> LFC. This happens when a field is focused/blurred by Lz.focus - >>> which is who calls the sprite.gotFocus/Blur() from the LFC. >> >> Where do the spurious events come from? I guess I don't get the >> "chain of command" here. It sounds like maybe you don't need >> _cancelfocus at all if you are going to turn it off every time you >> call gotFocus? >> >> What would be an example of when you _do_ want to cancel focus events? >> >>>> On 2009-07-10, at 15:27EDT, Max Carlson wrote: >>>>> Change 20090710-maxcarlson-4 by maxcarl...@bank on 2009-07-10 >>>>> 12:20:18 PDT >>>>> in /Users/maxcarlson/openlaszlo/trunk-clean >>>>> for http://svn.openlaszlo.org/openlaszlo/trunk >>>>> >>>>> Summary: Fix inputtext focusing issues in firefox >>>>> >>>>> Bugs Fixed: LPP-8284 - In dhtml it sometimes takes 2 clicks before >>>>> text can be entered >>>>> >>>>> Technical Reviewer: [email protected] >>>>> QA Reviewer: ptw >>>>> >>>>> Details: Clear out _cancelfocus and _cancelblur flags when the >>>>> sprite receives focus or blur events from the LFC. >>>>> >>>>> Tests: See LPP-8284 >>>>> >>>>> Files: >>>>> M WEB-INF/lps/lfc/kernel/dhtml/LzInputTextSprite.js >>>>> >>>>> Changeset: >>>>> http://svn.openlaszlo.org/openlaszlo/patches/20090710-maxcarlson-4.tar >>> >>> -- >>> Regards, >>> Max Carlson >>> OpenLaszlo.org >> >> > -- Regards, Max Carlson OpenLaszlo.org _______________________________________________ Laszlo-reviews mailing list [email protected] http://www.openlaszlo.org/mailman/listinfo/laszlo-reviews
