Hmm, thanks for that. The clone is a deep clone so I would expect the  
result to include the text value.

I think I'll have to work around this in the way you suggest (or  
perhaps modify the idrag.js to not use a clone).

Doug

On 18 Oct 2006, at 18:25, Dave Methvin wrote:

>> I've got an issue with using the Interface idrag.js.
>> ... what I see (using the DOM inspector from the web developer
>> toolbar for Firefox) is that the node tree is correctly cloned,
>> except that the "value" property of the textArea is not replicated.
>> Hence the cloned drag object has no text in it. ...
>>
>> A further wrinkle is that if the original text area contained  
>> initial text
>> within tag (e.g. "<textarea class='text' rows="8">flibble</ 
>> textarea>")
>> then that text (in this case "flibble") appears during the drag, even
>> if I have typed new text into the textArea before dragging.
>>
>> Has anyone else come across this problem and found any way
>> of addressing it?
>
> Here's what the W3C says about cloneNode:
>
> "Cloning an Element copies all attributes and their values,  
> including those
> generated by the XML processor to represent defaulted attributes,  
> but this
> method does not copy any text it contains unless it is a deep  
> clone, since
> the text is contained in a child Text node."
> http://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-1950641247
>
> Most people would want dynamic property values to be copied as  
> well, but it
> looks like FF uses the defaulted attributes; is the W3C is saying  
> that's
> compliant behavior? (The sentence isn't very clear to me.) Firefox  
> does
> something similar when you get .innerHTML on an element, it  
> represents the
> default attributes and not the current state.
>
> The only workaround I can think of is to copy the dynamic values  
> that got
> left behind right after cloning.
>
>
>
> _______________________________________________
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/


_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to