[opencms-dev] OpenCms and Bootstrap 5
Kai Widmann
Widmann at mediaworx.de
Thu Mar 31 17:22:07 CEST 2022
Hey there,
I’ll reply to myself, since I found a solution I want to share with you.
The Bootstrap css activates smooth scrolling and that’s what seems to be causing trouble (at least in Firefox and Safari, not in Chrome).
So the solution is, to undo what Bootstrap does. I have an „offline.css“ that’s only loaded in Offline mode when ADE is enabled. I added the following rule
:root {
scroll-behavior: unset;
}
So when editing the smooth scrolling is off, for the online mode smooth scrolling is on. That solved the problem.
Maybe this will help someone some time ;)
Cheers,
Kai
Am 31.03.2022 um 16:07 schrieb Kai Widmann via opencms-dev <opencms-dev at opencms.org<mailto:opencms-dev at opencms.org>>:
Hey fellow OpenCms developers,
I’m experiencing issues related to Bootstrap 5.
Our frontend dev is using Bootstrap 5.1.3 in his templates that I used to create OpenCms templates and formatters.
When editing content on pages after closing the content editor, I find myself on the top of the page instead of where I was before opening the editor. I tracked this down and it’s related to Bootstrap.
In my head I have this:
<link rel="stylesheet" href="/assets/libs/bootstrap-5.1.3-dist/css/bootstrap.min.css">
When I remove that line, the faulty behaviour stops, I’m back where I was before after closing the editor. I guess Bootstrap somehow messes with page scrolling.
Has anyone ever experienced something similar. Does anyone of you have an idea what I can do to prevent that faulty behaviour?
Any held is greatly appreciated!
Cheers, Kai
_______________________________________________
This mail is sent to you from the opencms-dev mailing list
To change your list options, or to unsubscribe from the list, please visit
https://lists.opencms.org/mailman/listinfo/opencms-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opencms.org/pipermail/opencms-dev/attachments/20220331/aa88e43c/attachment.htm>
More information about the opencms-dev
mailing list