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({
observerNode: '#content-body',
});
initRails();
// Put all initialisations here that can also wait after everything is rendered and ready
function deferredInitialisation() {
const $body = $('body');
......@@ -170,8 +172,6 @@ function deferredInitialisation() {
// Adding a helper class to activate animations only after all is rendered
setTimeout(() => $body.addClass('page-initialised'), 1000);
initRails();
}
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