I couldn't reproduce this on the v7.10.0.rc8 tag and on master. The text is supposed to be cleared upon a successful Ajax post. Anyone else running into this?
I haven't had that issue when i comment & close but sometimes I get it after a normal comment.
I can't reproduce it reliable. I'll take a look at the browser console next time I see it.
I reproduced this problem in Safari but not in Chrome or Firefox. It seems that for some reason, clicking on "Close and Comment" button is firing the ajax:error event instead of the ajax:success event. You can see the first XHR POST request to post the note, followed by another POST to close the event:
I think the second POST is causing a whole page refresh, which causes Safari to abort any outstanding XHR requests. When I change the submit anchor to use data-remote: true, both comment and close work requests go through fine but the page is not updated to refreshed to show the Closed state.
I think the right solution is to wait for the comment request to finish successfully before initiating the close event and whole page refresh. Unfortunately, I haven't figured out how to prevent the Close button from refreshing the whole page. Adding e.preventDefault() and return false to the click handler doesn't seem to change anything. There may a higher precedence click handler that causes this, but I haven't been able to figure out what that is.
Change the "comment & close" button to be a remote: true field, and we use the JS response to change the button type.
We add a param to the redirect_to in IssuesController#Update that we will check upon when redirecting back to the overview page, and then clear the text box.
I saw this pop up again with the current RC on firefox.
It seems that the last state of the div isn't changed, because when you click on Preview before submitting the comment it stays on the preview tab.