I'm trying to find a cross browser solution for editing text in a flickr photo caption manor where the text is displayed in a <div> or <a> tag but changes to a <textarea> via JS when clicked.
There are two problems.
1. setting the focus on the new textarea
2. keeping the new text value when switching back to normal text.
Firefox: focuses fine but does not keep the new text value
Safari: focuses then instantly looses focus again, and may not keep new text.
EI: does not set focus but does keep the new text value.
An example page including js can be seen here:
http://macrophotography.com/test.html
Any suggestion or help in figuring out what is happening would be greatly appreciated. I'm a beginner at JS.
Thanks!
Bugboy