List Info

Thread: Please review --- multiple textarea fixes (#141457, #132844 / #120607, innerText)




Please review --- multiple textarea fixes (#141457, #132844 / #120607, innerText)
country flaguser name
United States
2007-06-09 14:02:25
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

  
Re: Please review --- multiple textarea fixes (#141457, #132844 / #120607, innerText)
country flaguser name
Austria
2007-06-10 15:43:28
Am Samstag, 9. Juni 2007 schrieb Maksim Orlovich:
> 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?

Patch looks sane, but I can't test for now. Well, KDE 3.5.8
isn't released 
tomorrow 

mfg
	Leo


[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )