...sweet.  I hate IE!

Henry Minsky wrote:
In Firefox, asking for cssText gives you this

lzx> foo.sprite.__LzInputDiv.style.cssText
'overflow: scroll; font-family: monospace; width: 415px; height: 115px;'
lzx>

But in IE7 you get no font info
lzx> foo.sprite.__LzInputDiv.style.cssText
'OVERFLOW: scroll; WIDTH: 417px; CLIP: rect(auto auto auto auto); HEIGHT: 117px'
lzx>


On Wed, Oct 14, 2009 at 9:29 AM, Henry Minsky <henry.min...@gmail.com <mailto:henry.min...@gmail.com>> wrote:

    That apparently does not work in IE7 for some reason...

    On Wed, Oct 14, 2009 at 9:25 AM, P T Withington
    <p...@laszlosystems.com <mailto:p...@laszlosystems.com>> wrote:

        I don't follow.  setMultiline copies _all_ of the div styles over:

               lz.embed.__setAttr(newdiv, 'style', olddiv.style.cssText);

        (in addition to the scroll position).  So, something else is
        going wrong...


        On 2009-10-14, at 08:22, Max Carlson wrote:

            Yes, I think it needs to copy the necessary fontstyles over.
             Right now LzInputTextSprite#setMultiline() only preserves
            the text contents, scrollLeft and scrollTop.  The necessary
            styles should be preserved in:
            LzInputTextSprite.prototype.__fontStyle = 'normal';
            LzInputTextSprite.prototype.__fontWeight = 'normal';
            LzInputTextSprite.prototype.__fontSize = '11px';
            LzInputTextSprite.prototype.__fontFamily =
            'Verdana,Vera,sans-serif';

            I'd avoid copying the entire CSS style - that's pretty risky.

            Henry Minsky wrote:

                I'm trying to figure out why the font is changing back
                to the default font when an input field
                is set to multiline in IE7/DHTML.
                The code in LzInputTextSprite.setMultiline does create a
                new div, with _createInputDiv, does that need to
                copy the font styles over?
                <canvas>
                 <inputtext id="foo" width="400" x="14" name="foo"
                 font="monospace" fontsize="11" fontstyle="plain"
                           multiline="false"
                           text="${canvas.runtime}"
                           bgcolor="#ccffcc"
                           onclick="   setAttribute('multiline', true);
                this.setAttribute('height', 100); "/>
                </canvas>
-- Henry Minsky
                Software Architect
                hmin...@laszlosystems.com
                <mailto:hmin...@laszlosystems.com>
                <mailto:hmin...@laszlosystems.com
                <mailto:hmin...@laszlosystems.com>>


-- Regards,
            Max Carlson
            OpenLaszlo.org





-- Henry Minsky
    Software Architect
    hmin...@laszlosystems.com <mailto:hmin...@laszlosystems.com>





--
Henry Minsky
Software Architect
hmin...@laszlosystems.com <mailto:hmin...@laszlosystems.com>



--
Regards,
Max Carlson
OpenLaszlo.org

Reply via email to