I''m working on a page combining Ajax.InPlaceEditor and the
simple_format helper. The page is demonstrating some very strage
behavior. First, here is the code:
<p>Bio: </p>
<div id="bio">
<% if @user.bio %>
<%= simple_format( @user.bio ) %>\
<% else %>
No Bio Yet
<% end %>
</div><em>(click on your to bio edit it)</em>
<script language="JavaScript">
new Ajax.InPlaceEditor(''bio'',
''/users/preferences/savebio/<%@user.id %>'',
{rows:10,cols:40});
</script>
The InPlaceEditor works perfectly, but the page itself is what is
acting weird. Somehow on every refresh, an additional line break is
added to the final paragraph inside of the <div> so that the page
begins to rapidly expand. I can''t figure out how this is happening,
because it persists through both hard and soft refreshes *without
being saved to the database.*
Has anyone else experienced this strange behavior?
Thanks,
Josh