mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-21 18:55:19 -04:00
Updated to lock the navbar on changeMode
This commit is contained in:
parent
c9f35b9aa0
commit
33cdec2fd4
2 changed files with 12 additions and 1 deletions
|
@ -550,6 +550,7 @@ function toggleMode() {
|
|||
}
|
||||
|
||||
function changeMode(type) {
|
||||
lockNavbar();
|
||||
saveInfo();
|
||||
if (type)
|
||||
currentMode = type;
|
||||
|
@ -616,6 +617,16 @@ function changeMode(type) {
|
|||
ui.toolbar.view.addClass("active");
|
||||
modeIcon.addClass('fa-toggle-on');
|
||||
}
|
||||
unlockNavbar();
|
||||
}
|
||||
|
||||
function lockNavbar() {
|
||||
$('.navbar').addClass('locked');
|
||||
}
|
||||
|
||||
var unlockNavbar = _.debounce(function () {
|
||||
$('.navbar').removeClass('locked');
|
||||
}, 200);
|
||||
}
|
||||
|
||||
//button actions
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue