Loading core/.eslintrc.jquery.json +2 −2 Original line number Diff line number Diff line Loading @@ -5,7 +5,7 @@ "rules": { "jquery/no-ajax": 0, "jquery/no-ajax-events": 2, "jquery/no-animate": 0, "jquery/no-animate": 2, "jquery/no-attr": 0, "jquery/no-bind": 2, "jquery/no-class": 0, Loading core/misc/ajax.js +5 −1 Original line number Diff line number Diff line Loading @@ -1852,9 +1852,13 @@ while ($(scrollTarget).scrollTop() === 0 && $(scrollTarget).parent()) { scrollTarget = $(scrollTarget).parent(); } // Only scroll upward. if (offset.top - 10 < $(scrollTarget).scrollTop()) { $(scrollTarget).animate({ scrollTop: offset.top - 10 }, 500); scrollTarget.get(0).scrollTo({ top: offset.top - 10, behavior: 'smooth', }); } }, }; Loading core/modules/block/js/block.admin.js +7 −11 Original line number Diff line number Diff line Loading @@ -91,17 +91,13 @@ context, ).forEach((container) => { const $container = $(container); // Just scrolling the document.body will not work in Firefox. The html // element is needed as well. $('html, body').animate( { scrollTop: window.scrollTo({ top: $('.js-block-placed').offset().top - $container.offset().top + $container.scrollTop(), }, 500, ); behavior: 'smooth', }); }); } }, Loading core/modules/ckeditor5/js/ckeditor5.js +12 −6 Original line number Diff line number Diff line Loading @@ -651,12 +651,18 @@ // Respond to new dialogs that are opened by CKEditor, closing the AJAX loader. $(window).on('dialog:beforecreate', () => { $('.ckeditor5-dialog-loading').animate( { top: '-40px' }, const dialogLoading = document.querySelector('.ckeditor5-dialog-loading'); if (dialogLoading) { dialogLoading.addEventListener( 'transitionend', function removeDialogLoading() { $(this).remove(); dialogLoading.remove(); }, ); dialogLoading.style.transition = 'top 0.5s ease'; dialogLoading.style.top = '-40px'; } }); // Respond to dialogs that are saved, sending data back to CKEditor. Loading Loading
core/.eslintrc.jquery.json +2 −2 Original line number Diff line number Diff line Loading @@ -5,7 +5,7 @@ "rules": { "jquery/no-ajax": 0, "jquery/no-ajax-events": 2, "jquery/no-animate": 0, "jquery/no-animate": 2, "jquery/no-attr": 0, "jquery/no-bind": 2, "jquery/no-class": 0, Loading
core/misc/ajax.js +5 −1 Original line number Diff line number Diff line Loading @@ -1852,9 +1852,13 @@ while ($(scrollTarget).scrollTop() === 0 && $(scrollTarget).parent()) { scrollTarget = $(scrollTarget).parent(); } // Only scroll upward. if (offset.top - 10 < $(scrollTarget).scrollTop()) { $(scrollTarget).animate({ scrollTop: offset.top - 10 }, 500); scrollTarget.get(0).scrollTo({ top: offset.top - 10, behavior: 'smooth', }); } }, }; Loading
core/modules/block/js/block.admin.js +7 −11 Original line number Diff line number Diff line Loading @@ -91,17 +91,13 @@ context, ).forEach((container) => { const $container = $(container); // Just scrolling the document.body will not work in Firefox. The html // element is needed as well. $('html, body').animate( { scrollTop: window.scrollTo({ top: $('.js-block-placed').offset().top - $container.offset().top + $container.scrollTop(), }, 500, ); behavior: 'smooth', }); }); } }, Loading
core/modules/ckeditor5/js/ckeditor5.js +12 −6 Original line number Diff line number Diff line Loading @@ -651,12 +651,18 @@ // Respond to new dialogs that are opened by CKEditor, closing the AJAX loader. $(window).on('dialog:beforecreate', () => { $('.ckeditor5-dialog-loading').animate( { top: '-40px' }, const dialogLoading = document.querySelector('.ckeditor5-dialog-loading'); if (dialogLoading) { dialogLoading.addEventListener( 'transitionend', function removeDialogLoading() { $(this).remove(); dialogLoading.remove(); }, ); dialogLoading.style.transition = 'top 0.5s ease'; dialogLoading.style.top = '-40px'; } }); // Respond to dialogs that are saved, sending data back to CKEditor. Loading