HomePhabricator

mobile.init/editor: Don't create loading overlay if we're not going to use it

Authored by matmarex on Feb 6 2019, 6:28 PM.
This commit has been deleted in the repository: it is no longer reachable from any branch, tag, or ref.

Description

mobile.init/editor: Don't create loading overlay if we're not going to use it

When working on 5f7cbd16c9bb5ff5d9b29393d538f7c81f19a784, I didn't
realize that loadingOverlay.appendTo( document.body ) is actually
going to display the overlay even if loadingOverlay.show() is not
called. Rearrange the code to only create and append the overlay if
we really want to display it (if we're going to load VisualEditor).

Bug: T209052
Bug: T215469
Change-Id: Ie4d656cdbf8c716a1e516c2ef0ca165772c344e3
(cherry picked from commit 03fcd19637c4fd608908f589d1d5991aa3e63aab)