[Laszlo-dev] Need some help [#LPP-5447] DHTML: inputtext and clickable - OpenLaszlo Jira

Max Carlson max at openlaszlo.org
Wed Jul 22 14:46:21 PDT 2009


P T Withington wrote:
> [[#LPP-5447] DHTML: inputtext and clickable - OpenLaszlo 
> Jira](http://jira.openlaszlo.org/jira/browse/LPP-5447)
> 
> What is the difference between LzInputTextSprite/__setglobalclickable 
> and LzMouseKernel.setGlobalClickable?  In particular, the latter just 
> turns off the whole click tree by hiding the root of the tree (which 
> seems should be pretty efficient) and the latter turns off only divs 
> that have the class `lzclickdiv` by modifying the CSS style rule 
> associated with that class (which seems might be more expensive).  Why 
> the two different methods?

LzInputTextSprite/__setglobalclickable() is used by inputtexts to 
disable clickable.  Since inputtexts currently bind into the click div 
(see LzInputTextSprite.__show) the clickdiv itself can't be hidden - or 
else the inputtext would be hidden also.

LzMouseKernel.setGlobalClickable() is used by the html tag to disable 
the click tree so it doesn't interfere with an iframe's.

> Can you explain the purpose of __lastShown, __focusedSprite, and 
> __lastfocus?  I can't follow what these are trying to do.

__lastshown tracks the last inputtext to be shown by __show(), and is 
used to hide the currently showing inputtext.
__focusedSprite tracks the last inputtext to be focused, and is used to 
work around bugs in firefox's focus management and prevent 
spurious/extra onfocus/blur events from being sent.
__lastfocus holds a reference to the last inputtext to be selected - by 
select() or setSelection().  It's used as a callback (see setTimout()) 
to work around a bug in IE where a field can't be selected immediately 
after it's focused.

Complicated, no?  Since you're in there, can you please add these notes 
as comments?  Thanks!

-- 
Regards,
Max Carlson
OpenLaszlo.org


More information about the Laszlo-dev mailing list