jeremy.g.slade-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2008-Jul-04 00:15 UTC
Element.Methods.update -- broken on IE6?
(Tried to search for this already, but didn''t find anything... I would
think others have hit this?)
Using Ajax.InPlaceEditor, when I send the new value to the server and
get back the response, IE6 shows the updated value as "[object]",
whereas Firefox and Safari show the new value correctly (haven''t
tested other browsers).
I tracked this down to Element.Methods.update:
if (content && content.toElement) content = content.toElement();
Evidently a string has a toElement method in IE? So
content.toElement() ends up getting called, replacing the original
value of the content string. I patched this as follows, seems to
work:
if ( typeof(content) == "string" ) content = "" +
content;
else if (content && content.toElement) content content.toElement();
I did this in both places where Element.Methods.update is defined.
There are several other places where "if (content &&
content.toElement) ..." occurs (update, insert, replace). Should this
same change be applied to those methods as well?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Spinoffs" group.
To post to this group, send email to
rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---