Defer hiding and reloading the draft banner

Review Request #7924 — Created Jan. 30, 2016 and submitted — Latest diff uploaded

Information

Review Board
release-2.5.x
13cf704...

Reviewers

We need to do this because hideAndReload might be called from
within a $.funcQueue, and on Firefox, a change to window.location
will result in later functions in the $.funcQueue not running.

Deferring until the next tick of the event loop allows the rest
of the $.funcQueue to run.

Fixes bug 3727.

Created a review request that I had edit rights on. After
publishing, I attempted to create a review on myself, and hit
"Publish" in the review dialog. Without this patch, I see the
"Are you sure you want to leave this page" popup. With this
patch, I don't see the popup, and the page reloads correctly.

    Loading...