mirror of
https://github.com/cryptpad/cryptpad.git
synced 2026-09-14 11:05:41 +05:00
Keep state #1831
This commit is contained in:
parent
f84a4f8cd6
commit
ead09ca46c
@ -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;
|
||||
};
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user