mirror of
https://github.com/zadam/trilium.git
synced 2025-11-02 11:26:15 +01:00
fix JS errors comming from resize when fancytree and summernote isn't initialized yet
This commit is contained in:
@@ -1,7 +1,16 @@
|
|||||||
$(function() {
|
$(function() {
|
||||||
$(window).resize(function() {
|
$(window).resize(function() {
|
||||||
$('ul.fancytree-container').height($(window).height() - $('ul.fancytree-container').offset().top - 10);
|
const fancyTree = $('ul.fancytree-container');
|
||||||
$('div.note-editable').height($(window).height() - $('div.note-editable').offset().top);
|
|
||||||
|
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();
|
$(window).resize();
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user