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.

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
Change-Id: Ie4d656cdbf8c716a1e516c2ef0ca165772c344e3