Form submission dosn't work after self-destruction of child

Form submission dosn't work after self-destruction of child

Browser: firefox 14.0.1
In simple test below if you press button "test1", then button "test2" will not work.
In Google Chrome it's ok.
  1. <html>
  2. <head>
  3. <script type='text/javascript' src='/js/jquery-1.5.2.min.js'></script>
  4. </head>
  5. <body>
  6. <? echo $_POST[test]; ?>
  7. <form action='test.php' id='form' method='post'>
  8. <input name='test' type='text' value='testval'>
  9. <button onclick='$(this).remove(); return false;'>test1</button>
  10. <input  type='submit' >
  11. </form>
  12. <button onclick='$("#form").submit();'>test2</button>
  13. </body>
  14. </html>