This commit is contained in:
DianaXWiki 2025-06-04 17:30:28 +03:00 committed by yflory
parent f84a4f8cd6
commit ead09ca46c

View File

@ -1340,6 +1340,7 @@ define([
text: text
};
};
let toolbarVisibleOnSmallScreen = false;
UIElements.createMarkdownToolbarToggle = function(toolbarElement, editor) {
var $button = $(h('button', {
@ -1364,6 +1365,7 @@ define([
$button
.attr('title', newLabel)
.attr('aria-label', newLabel);
toolbarVisibleOnSmallScreen = !isExpanded;
});
$(toolbarElement).on('keydown', function (e) {
@ -1383,9 +1385,6 @@ define([
return window.innerHeight < 530 || window.innerWidth < 530;
}
let toolbarVisibleOnSmallScreen = false;
let wasSmallScreen = isSmallScreenToolbar();
UIElements.updateToolbarVisibility = function(markdownEditorWrapper, toolbar, editor) {
let toggleButton = null;
const isSmallScreen = isSmallScreenToolbar();
@ -1408,7 +1407,6 @@ define([
$(markdownEditorWrapper).find('.cp-markdown-toggle-button').remove();
$(toolbar).show();
}
wasSmallScreen = isSmallScreen;
return toggleButton;
};