2129: Editing comments in Firefox creates duplicate comments

ben.*****@gmai***** (Google Code) (Is this you? Claim this profile.)
June 11, 2011
What version are you running?
1.6beta2


What's the URL of the page containing the problem?
Any review request page

What steps will reproduce the problem?
1. Create a review request and publish a review on it
2. Click the "Add comment" button on the review
3. Type in some text and hit 'OK'
4. Now, click on the comment that you just added and edit it.  Modify the text to something completely different and hit 'OK'.


What is the expected output? What do you see instead?
The screen will show only the most recent version of your comment.  When you click "publish", both the original version of your comment followed by the more recent version will get published.  This gets especially annoying if you have edited a comment many times before publishing (I did this earlier and ten only-slightly-different comments appeared when I published).

Also, refreshing the page after editing a comment (before publishing) will cause both the old and new messages to display.  There doesn't seem to be a way to delete the old comment.

Instead of the comment having a pencil icon next to it, it has multiple pencil icons (one for each time you made an edit and hit 'OK').


What operating system are you using? What browser?
Windows 7, Firefox 4.0.1
When using IE9, editing comments works as expected.

Please provide any additional information below.
#1 ben.*****@gmai***** (Google Code) (Is this you? Claim this profile.)
Attached is a screenshot showing what I see in my browser if I edit a comment twice and refresh the page.  I added the comment "reply to reply", hit 'OK', edited the comment and added "which has been updated", hit 'OK', and then refreshed the page.

Also attached is a snippet of the generated HTML that from the same view as the screenshot (in case it is useful).
  • +
    +
      <div id="rc2-6">
       <div class="issue-indicator"></div>
       <ol class="reply-comments">
        
       <li class="reply-comment">
        <dl>
         <dt>
          <label for="comment_rc2-7">
          <a href="/users/A****/" class="user">A****</a>
          <span class="timestamp">6 days, 3 hours ago (June 2nd, 2011, 2:45 p.m.)</span>
          </label>
         </dt>
         <dd><pre id="comment_rc2-7" class="reviewtext">That's a bug, thanks!</pre></dd>
        </dl>
       </li>
       <li class="reply-comment draft" id="yourcomment_rc2-113-item">
        <dl>
         <dt>
          <label for="yourcomment_rc2-113">
          <a href="/users/AllenB/" class="user">Ben Allen</a>
          <span class="timestamp">0 minutes ago (June 8th, 2011, 6:24 p.m.)</span>
          <a class="editicon" aria-label="Edit this field" role="button" href="#"><img src="/media/rb/images/edit.png?1306958611"></a><a class="editicon" aria-label="Edit this field" role="button" href="#"><img src="/media/rb/images/edit.png?1306958611"></a></labe
#2 ben.*****@gmai***** (Google Code) (Is this you? Claim this profile.)
Correction: In IE9, an edited comment does cause a double-post when the edits are published.  However, the double comment isn't always visible when you refresh the page.
david
#3 david
This is fixed in master and will be fixed in the next pre-release of 1.6. If you want, you can deploy a nightly to fix it.
  • +Fixed