[PATCH] Please review --- multiple textarea fixes (#141457, #132844 / #120607, innerText)

Maksim Orlovich mo85 at cornell.edu
Sat Jun 9 20:02:25 BST 2007


Hi.. Please take a look at the attached patch, which fixes a number of 
problems with syncing between the renderer and the DOM (including one bug 
that made deleting selection in wordpress impossible, and the losing-value on 
re-display bug), and along the way adds the innerText support Stefan Eilers 
asked for. 

The main idea of the changes is a follows:
1. Simplify the syncing logic by making the renderer always be definitive when 
it exists.

2. Change how we  initialize from the defaultValue --- instead of doing it in 
the renderer's close (which is what causes the disappearing text bug), we 
update value to defaultValue when the children change. That also makes 
innerText work sensibly on textareas.

Now, a good question is, do other browsers behave like that, e.g. 
change .value when children change? Well, I tested Mozilla, Opera, IE6, and 
looked at the code of Safari. All of them do something totally different. IE6 
and Mozilla's behavior at all pretty weird. Opera's makes sense, but basic IE 
compatibility is a weird hack in innerText. I actually adopted what Safari 
does, because it's simple and as far as I can see should be compatible with 
IE in the less obscure of the cases...

Comments?
-Maks
-------------- next part --------------
A non-text attachment was scrubbed...
Name: textarea-sync.diff
Type: text/x-diff
Size: 6606 bytes
Desc: not available
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20070609/7b666b8f/attachment.diff>


More information about the kfm-devel mailing list