mirror of
https://github.com/sparksuite/simplemde-markdown-editor.git
synced 2024-06-01 21:42:28 +02:00
Merge pull request #527 from luclu/fix-sideBySide-fullscreen-toggle
Fix toggleFullscreen() if icon is hidden
This commit is contained in:
commit
0b4b70a4a2
|
@ -211,12 +211,14 @@ function toggleFullScreen(editor) {
|
|||
|
||||
|
||||
// Update toolbar button
|
||||
var toolbarButton = editor.toolbarElements.fullscreen;
|
||||
if (editor.toolbarElements.fullscreen) {
|
||||
var toolbarButton = editor.toolbarElements.fullscreen;
|
||||
|
||||
if(!/active/.test(toolbarButton.className)) {
|
||||
toolbarButton.className += " active";
|
||||
} else {
|
||||
toolbarButton.className = toolbarButton.className.replace(/\s*active\s*/g, "");
|
||||
if(!/active/.test(toolbarButton.className)) {
|
||||
toolbarButton.className += " active";
|
||||
} else {
|
||||
toolbarButton.className = toolbarButton.className.replace(/\s*active\s*/g, "");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue