When deleting a comment, the page layout goes haywire, making it impossible to continue working on the page until it is reloaded. It appears something is going b0rken when the 'deleted' state is swapped in.
I can reproduce this on both Chrome (80.0.3987.149) and on Firefox (74.0), on Mac OS X. I disabled all all browser extensions to ensure this was not caused by something I installed locally.
The same effects can also be observed when reviewing in the review queues, where review items result in nested page Chrome.
Comment deleting example
This is the page before deleting a comment (comments blurred to focus on the layout, not content):
After deleting the top comment, where the comments were layd out before, we now have just the deleted comment:
The sidebar on the right has been partially re-arranged. The other comments have mostly disappeared, except for their icons and vote counts, and now take up more space, below:
and if I scroll to the right, those comments are scrunched up on the right-hand side below.. is that an extra page footer?!
Before anyone asks: no, you can't delete those comments on the right now, as we now have double-loaded JavaScript structures. I can't make it recurse. :-P
Trying to diagnose this, I notice that the comment is being replaced by something that has a <title></title>
element followed by a whole load more tags I'd expect to find in the head of a HTML page.
So I looked at the AJAX response, and it indeed contains a full document:
{"Success":true,"Warning":false,"NewScore":-1,"Message":"<!DOCTYPE html>\r\n\r\n\r\n <html class=\"html__responsive html__unpinned-leftnav\">\r\n\r\n <head>\r\n\r\n <title></title>\r\n <link [ ... long document elided ... ] </body>\r\n </html>\r\n","Refresh":false,"Transient":false,"Info":false}
Review issues
This also happens when reviewing; review items are loaded over AJAX with full page chrome:
Skipping a review post simply results in a JavaScript error (TypeError: $(...).html(...).addSpinner is not a function
) as the returned response with full HTML page is clearly not working for whatever is processing the responses.
Can this please be fixed?