- Issue created by @zengenuity
- Merge request !93Issue #3494342 - Closing dialogs can cause content in editor to horizontally scroll β (Open) created by zengenuity
When closing a dialog after editing a layout, the content in my editor is scrolling horizontally, as shown in this GIF:
This may not be reproducible in other themes. My front-end theme is a Bootstrap5 β subtheme. It's happening consistently for me every time I edit a layout. It doesn't happen if I edit a component-type paragraph.
I've traced this back to this section of code in post-messages-listener.js:
onCloseMercuryDialog: function () {
document.querySelectorAll('.is-me-focused').forEach((el) => {
el.focus();
el.classList.remove('is-me-focused');
});
}
If it's changed to the follow, the scrolling behavior doesn't happen.
onCloseMercuryDialog: function () {
document.querySelectorAll('.is-me-focused').forEach((el) => {
el.focus({preventScroll: true});
el.classList.remove('is-me-focused');
});
}
MR coming
None.
None.
None.
Active
2.1
Code