mirror of
https://github.com/zadam/trilium.git
synced 2024-12-27 09:43:18 +08:00
fix JS errors comming from resize when fancytree and summernote isn't initialized yet
This commit is contained in:
parent
5e8edf4469
commit
0f8c0b7cea
1 changed files with 11 additions and 2 deletions
|
@ -1,7 +1,16 @@
|
|||
$(function() {
|
||||
$(window).resize(function() {
|
||||
$('ul.fancytree-container').height($(window).height() - $('ul.fancytree-container').offset().top - 10);
|
||||
$('div.note-editable').height($(window).height() - $('div.note-editable').offset().top);
|
||||
const fancyTree = $('ul.fancytree-container');
|
||||
|
||||
if (fancyTree.length) {
|
||||
fancyTree.height($(window).height() - fancyTree.offset().top - 10);
|
||||
}
|
||||
|
||||
const noteEditable = $('div.note-editable');
|
||||
|
||||
if (noteEditable.length) {
|
||||
noteEditable.height($(window).height() - noteEditable.offset().top);
|
||||
}
|
||||
});
|
||||
$(window).resize();
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue