XWIKI-11171: Continuous loading screen after maximizing & previewing a page in the Wiki editor.

(cherry picked from commit d7e40ba7b47f9d6b06eb1aa2684fd72704c8e196)