Commit 39bc9676 authored by Vitaly Slobodin's avatar Vitaly Slobodin

Merge branch 'initialize-rails-ujs-earlier' into 'master'

Initialize rails-ujs earlier

See merge request gitlab-org/gitlab!43712
parents 8b1865e9 0a8a006c
...@@ -97,6 +97,8 @@ gl.lazyLoader = new LazyLoader({ ...@@ -97,6 +97,8 @@ gl.lazyLoader = new LazyLoader({
observerNode: '#content-body', observerNode: '#content-body',
}); });
initRails();
// Put all initialisations here that can also wait after everything is rendered and ready // Put all initialisations here that can also wait after everything is rendered and ready
function deferredInitialisation() { function deferredInitialisation() {
const $body = $('body'); const $body = $('body');
...@@ -170,8 +172,6 @@ function deferredInitialisation() { ...@@ -170,8 +172,6 @@ function deferredInitialisation() {
// Adding a helper class to activate animations only after all is rendered // Adding a helper class to activate animations only after all is rendered
setTimeout(() => $body.addClass('page-initialised'), 1000); setTimeout(() => $body.addClass('page-initialised'), 1000);
initRails();
} }
document.addEventListener('DOMContentLoaded', () => { document.addEventListener('DOMContentLoaded', () => {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment