New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bugfix: Correctly keep preview active during fullscreen-toggle #316
Bugfix: Correctly keep preview active during fullscreen-toggle #316
Conversation
@Ionaru Anyone using |
It's a big change with lots of code changes, it's going to take a little while to make sure everything still works as it's supposed to. |
Note that this isn't necessary and can be rolled back, but could be used throughout the code to make class handling more clear and consistent.
Understood. Fundamentally, there's only two changes:
I did also just add some add/removeClass convenience functions, because the string manipulation of classNames is a common pattern, but that can be reversed. |
This is a fix for issues created by #286, as noted in #306.
The initial attempt to keep preview active when toggling full-screen, was to simply not call
toggleSideBySide()
, which unfortunately didn't account for "no-fullscreen" classes that are applied in the non-fullscreen side-by-side preview mode.In this PR:
.sided--no-fullscreen
only to the parent element and using CSS inheritance.sided--no-fullscreen
as neededFor future refactoring, it would be cleaner to apply general status classes to the
.EasyMdeContainer
, such asfullscreen sided
and have the sub-elements key off the parent class to avoid having to set classes on multiple elements. This would allow all the.EasyMdeContainer.sided--no-fullscreen ...
classes be replaced with.EasyMdeContainer.sided:not(.fullscreen)
, with similar changes throughout the rest of the code (.editor-toolbar.fullscreen
to.EasyMdeContainer.fullscreen .editor-toolbar
, etc.).