JavaScript: Reading/Writing to TextArea with "innerText"

Stefan Eilers stefan.eilers at basyskom.de
Thu Jul 5 10:11:53 BST 2007


Hi!
Am 06.06.2007 um 15:22 schrieb Maksim Orlovich:

Sorry for this delay. I was a little bit busy..

> Good catch, but I am afraid this isn't neccesserilly so simple. The  
> reason
> it "doesn't work" is that the value of a text area isn't the same  
> as the
> value of its text children, which is what the normal innerText  
> changes.

This is right.

>
> So there are a couple of questions that need to be answered first:
> a) Does changing the child text nodes reset the value? If so,  
> innerText
> should not be changed, but HTMLFormElementImpl needs to work for child
> changes, which would be rather tricky.

I thought about this issue. But implementing it this way is beyond my  
knowledge about the implementation details. The interesting question  
is, how IE does it. Do they really change the child nodes? I don't know.

>
> b) Does setting innerText change the DOM children? If so, your patch
> should probably be using setDefaultValue, not setValue.
>
> c) If value isn't the same as defaultValue, which one does  
> innerText return?
>
> Also, it'd probably be better to implement this in html/ and not  
> ecma/ ---
> by making setInnerText/innerText virtual and overriding in
> HTMLTextAreaImpl

I fear the effort to fix it "the right way" isn't worth it. But this  
cannot answered without real examples.

>
> Do you have any real testcases, and not just an example?

Yes. But you need a patch which temporarily fixes an iFrame issue.  
Otherwise you cannot log into it. If you like, I would send you a  
demo account and the patch.

Mfg., Dr. Stefan Eilers
--  

Dr.-Ing. Stefan Eilers
Projekt Manager

basysKom GmbH
Robert-Bosch-Str. 7 | 64293 Darmstadt | Germany
Tel: +49 6151 3968753 | Fax: -736 | Mobile: +49 170 4213459
stefan.eilers at basyskom.de | www.basyskom.de

Handelsregister: Darmstadt HRB 9352
Geschaeftsfuehrung: Eva Brucherseifer


-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 188 bytes
Desc: Signierter Teil der Nachricht
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20070705/a5e367e9/attachment.sig>


More information about the kfm-devel mailing list