[Laszlo-dev] problem with IE7 dhtml click divs
P T Withington
ptw at pobox.com
Thu Aug 20 17:45:56 PDT 2009
That's the issue. IE barfs if you try to add a child to an IMG tag.
I guess for ie we'll need to have the clickdiv be a div and have the
clickable img as a child to make this work?
On 2009-08-20, at 20:26EDT, Max Carlson wrote:
> Does it really make sense to add subviews to an inputtext? I guess
> since calendar does it we implicitly support this...
>
> I suspect changing back to a regular div will create other issues in
> IE. Perhaps we need to look at the way the DOM hierarchy was before
> r14414...
>
> Are you sure appendChild() doesn't work for images?
>
> Henry Minsky wrote:
>> This code is causing an error in IE7 DHTML, (http://openlaszlo.org/jira/browse/LPP-8380
>> ), IE7 barfs when it tries to
>> add a child sprite to an inputtext, because the containerclickdiv
>> is an IMG, not a regular DIV.
>> The error is showing up in the calendar demo, because there is this
>> subclass of inputtext which has views in it
>> <class name="inputtextbox" extends="inputtext" bgcolor="white">
>> <!-- fgcolor="#535353"-->
>> <view name="v_border" height="1" bgcolor="black" width="$
>> {parent.width}" />
>> <view name="h_border" width="1" y="1" bgcolor="black" height="$
>> {parent.height -1}" />
>> The error happens in LzSprite#addChildSprite at this point
>>
>> this
>> .__LZclickcontainerdiv.appendChild( sprite.__LZclickcontainerdiv );
>> The code which creates the containerclickdiv for inputtext is here,
>> maybe it could create a "div' instead of 'img' class?
>> 4255 max if (this.quirks.fix_clickable) {
>> 4255 max if (this.quirks.fix_ie_clickable) {
>> 14414 max this.__LZclickcontainerdiv =
>> document.createElement('img');
>> 14414 max this.__LZclickcontainerdiv.src =
>> lz.embed.options.serverroot + LzSprite.prototype.blankimage;
>> 14414 max this.__LZclickcontainerdiv.className =
>> 'lzclickdiv';
>> 14414 max this.__LZclickcontainerdiv.owner = this;
>> 3457 max }
>> --
>> Henry Minsky
>> Software Architect
>> hminsky at laszlosystems.com <mailto:hminsky at laszlosystems.com>
>
> --
> Regards,
> Max Carlson
> OpenLaszlo.org
More information about the Laszlo-dev
mailing list