Re: Dynamically changing textbox to multiline

Neil <[email protected]>
Newsgroups gmane.comp.mozilla.devel.xpfe
Message-ID <[email protected]>
Neil wrote:

> [email protected] wrote:
>
>> I am trying to dynamically change a single line textbox to multiline 
>> when a user pastes in text containing newline characters.
>>
>> The problem is that when I do "setAttribute('multiline', true)" the 
>> textbox is converted to multiline, but the value in the textbox is 
>> lost. Is this a bug or am I missing something?
>
> Changing the textbox to multiline is achieved by deleting the HTML 
> input element and creating a textarea element in its place. There is 
> some ancient code that might copy the value from one to the other but 
> offhand I don't even know if it gets a chance to run.

The code I was looking at doesn't run in the case of converting a 
textbox to multiline, so you'll have to save the value manually.

-- 
Warning: May contain traces of nuts.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.