Ticket #4140? observe_field issue


Take these two basic bits of HTML.

//<![CDATA[ new Form.Element.EventObserver('user_email', function(element, value) {new Ajax.Request('/account/validate_user_email/0', {asynchronous:true, evalScripts:true, parameters:'user_email=' + value})}) //]]> </script> <p>and</p> <p><input id="user_first_name" name="user[first_name]" size="30" type="text" value="" /></p> <script type="text/javascript"> //<![CDATA[ new Form.Element.EventObserver('user_first_name', function(element, value) {new Ajax.Request('/account/validate_user_first_name/0', {asynchronous:true, evalScripts:true, parameters:'user_first_name=' + value})}) //]]> </script> <p>You would think they are completely identical. Both just a simple<br> text_field<br> and then an observe_form done the way that they are prescribed to be<br> done.<br> However, the first one does generate a request on change and the second<br> one<br> does. No errors are produced by the email version. And, the same effect<br> is<br> had on Safari and Firefox on three different platforms.</p> <p>This also works where “last_name” works and “password” doesn’t work and<br> “login” does work.</p> <p>Seemingly random as they are all produced by the same code (totally<br> DRY).</p> <p>Anybody know why?</p> <p>I see Ticket <span class="hashtag">#4140</span><br> <a href="http://dev.rubyonrails.org/ticket/4140" class="onebox" target="_blank">http://dev.rubyonrails.org/ticket/4140</a><br> But, doesn’t look like anyone is planning on fixing it anytime soon.</p> <p>Can other people reproduce this? Anyone else found a way around it?</p> <p>This seems like a pretty serious bug to me.</p> <p>-hampton.</p>