maqetta/maqetta — Issue #1867: Review editor leaves dangling "stay on this page" handler
Author: JonFerraiolo
Created: 2012-03-06 22:33:49+00:00
State: open
Labels: Priority Med, Review and Commenting

@aerwin, @childsb, @doronrosenberg

Assigning to @waynevicknair but maybe one of the folks above might have cycles and want to snatch this bug and fix it.

* Create a review
* Open the HTML file for that review
* Add a comment, add an annotation while comment is open, but don't click Submit
* Close the review editor. You will see an "are you sure" prompt. Click OK/yes to close the review editor
* Click the back button on your browser

Result=> Browser dialog appears asking whether you want to leave this page or stay on this page

My guess is that there is a browser unload event handler in the review code that gets installed when a comment is open for editing. What I believe is the best behavior is that we leave the "leave or stay" prompt when a comment is opened, but remove that event handler once a comment is closed.