mirror of
https://github.com/Ionaru/easy-markdown-editor
synced 2025-07-02 23:54:28 -06:00
Fix toggleFullscreen() if icon is hidden
This commit is contained in:
parent
5b8611628b
commit
18f8256a4a
@ -211,12 +211,14 @@ function toggleFullScreen(editor) {
|
|||||||
|
|
||||||
|
|
||||||
// Update toolbar button
|
// Update toolbar button
|
||||||
var toolbarButton = editor.toolbarElements.fullscreen;
|
if (editor.toolbarElements.fullscreen) {
|
||||||
|
var toolbarButton = editor.toolbarElements.fullscreen;
|
||||||
|
|
||||||
if(!/active/.test(toolbarButton.className)) {
|
if(!/active/.test(toolbarButton.className)) {
|
||||||
toolbarButton.className += " active";
|
toolbarButton.className += " active";
|
||||||
} else {
|
} else {
|
||||||
toolbarButton.className = toolbarButton.className.replace(/\s*active\s*/g, "");
|
toolbarButton.className = toolbarButton.className.replace(/\s*active\s*/g, "");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user