So ... not sure how to proceed here. One 'least perturbance of the code' option would be to kind of wimp out and check the type of the parent clickcontainerdiv, and if it's an IMG, just don't put any children in it. The use case in calendar is some artwork that goes in the inputtext, and I would be ok with clickable views not working if they are children of input texts.
On Thu, Aug 20, 2009 at 8:51 PM, P T Withington <[email protected]> wrote: > Pretty sure it works in FF because we only use the IMG element in IE > because of fix_ie_clickable quirk. > > > On 2009-08-20, at 20:45EDT, Henry Minsky wrote: > > On Thu, Aug 20, 2009 at 8:26 PM, Max Carlson <[email protected]> >> 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? >>> >> >> >> It works in Firefox, but gives an error in IE7. >> >> >> >> >>> >>> 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 >>>> [email protected] <mailto:[email protected]> >>>> >>>> >>>> >>>> -- >>> Regards, >>> Max Carlson >>> OpenLaszlo.org >>> >>> >> >> >> -- >> Henry Minsky >> Software Architect >> [email protected] >> > > -- Henry Minsky Software Architect [email protected]
