Browse Source

MC - hide mask immediately after getting content

Vijayakrishnan 4 years ago
parent
commit
93ed6a9657
1 changed files with 4 additions and 2 deletions
  1. 4 2
      public/js/mc.js

+ 4 - 2
public/js/mc.js

@@ -146,6 +146,8 @@ function onFastLoaded(_data, _href, _history) {
         content = content.html();
         content += '<script src="/js/yemi.js?_=7"></script>';
         targetParent.html(content);
+        hideMask();
+        hideMoeFormMask();
         window.setTimeout(function() {
             initCreateNote();
             initQuillEdit();
@@ -165,9 +167,9 @@ function onFastLoaded(_data, _href, _history) {
         // fallback
         console.warn('MC: Target page failed: ' + _href);
         targetParent.html('<p class="text-danger p-3 small">Target page not found or returned error: <b>' + _href + '</b></p>');
+        hideMask();
+        hideMoeFormMask();
     }
-    hideMask();
-    hideMoeFormMask();
     $('html, body').removeClass('no-scroll');
 }
 function fastLoad(_href, _history = true, _useCache = true, _replaceState = false) {