[Laszlo-dev] For Review: Change 20070117-maxcarlson-y Summary: Fix inputtext with clickable parent in DHTML, make splash part of html so it loads earlier

Max Carlson max at openlaszlo.org
Thu Jan 18 09:43:48 PST 2007


P T Withington wrote:
> I was looking at this and had some comments and questions:
> 
> 1) Would it be better to  use multiple classes: `lzdiv lzclick` instead 
> of `lzclickdiv` and `lzdiv lzclick lzinput` instead of 
> 'lzinputclickdiv`?  Might give more flexibility -- you could set just 
> the rule for the `lzclick` class and affect both regular and input divs 
> at once.

It may be.  I'll try this as an optimization later.

> 2) Looks like you've got a redundant line of code here:
> 
>> +            if (LzSprite.prototype.quirks.fix_ie_clickable) {
>> +                if (c != true) this.__LZclick.style.display = 'none';
>> +                this.__LZclick.style.display = c ? '' : 'none';
>> +            } else {
>> +                this.__LZclick.style.display = c ? 'block' : 'none';
>> +            }

Thanks - good catch!

> What exactly does it mean to set the display style to empty?  Is that 
> the same as `inherit`?  Maybe `inherit` is really what we want here and 
> then you wouldn't need a quirk?

It is the same as inherit - unfortunately, IE 7 doesn't like 
style.display = 'inherit'...

> 3) I'm not sure I quite grok what is going on with moving the (input) 
> div and the (input) click div, but I wonder if rather than twiddling the 
> style or style sheet you could just have a rule like (assuming you used 
> multiple classes):

IE requires different nesting rules.  Also, if there are _any_ clickable 
divs behind the inputtext they'll grab clicks.  This is the reason I 
temporarily hide all clickable divs when the inputtext is selected.

> .lzdiv + .lzclick { display: none; }
> 
> and make the click be displayed or not by whether it is before or after 
> the (input) div?

A fine idea.  I'll try optimizing it later - most of this is IE-specific 
anyway.

> On 2007-01-17, at 23:18 EST, Max Carlson wrote:
> 
>> Change 20070117-maxcarlson-y by maxcarlson at max-carlsons-computer.local 
>> on 2007-01-17 20:04:14 PST
>>     in /Users/maxcarlson/openlaszlo/legals
>>
>> Summary: Fix inputtext with clickable parent in DHTML, make splash 
>> part of html so it loads earlier
>>
>> New Features:
>>
>> Bugs Fixed: LPP-3307 - Empty inputtext with clickable parent can't be 
>> selected in IE DHTML
>>
>> Technical Reviewer: promanik
>> QA Reviewer: hminsky
>> Doc Reviewer: (pending)
>>
>> Documentation:
>>
>> Release Notes:
>>
>> Details: This fixes the testcase in LPP-3307, but it doesn't fix 
>> amazon - that is a separate issue I tracked down to the textlistitem 
>> in the cardform class - I'll fix later.  It also fixes the testcase 
>> under firefox, which is currently broken.
>>
>> LzSprite.js - splash code simplified to look for div id lzsplash on 
>> init.  Added __setCSSClassProperty() method to tweak stylesheet 
>> properties at runtime.  IE leak prevention off for IE version and up.  
>> Use discreet stylesheet classes for clickable divs.
>>
>> LzInputTextSprite.js -  Use discreet stylesheet classes for clickable 
>> divs.  Line height measured with test string for empty inputtext.
>>
>> html-response.xslt - Move lzsplash to static div in html wrapper.
>>
>>
>> Tests: LPP-3307 testcase works in firefox mac, ie 7 win.  All other 
>> apps continue to work.  Amazon almost works in ie 7 windows.
>>
>> Files:
>> M      WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js
>> M      WEB-INF/lps/lfc/kernel/dhtml/LzInputTextSprite.js
>> M      WEB-INF/lps/templates/html-response.xslt
>>
>> Changeset: 
>> http://svn.openlaszlo.org/openlaszlo/patches/20070117-maxcarlson-y.tar
> 


-- 
Regards,
Max Carlson
OpenLaszlo.org


More information about the Laszlo-dev mailing list