Partially fix slow editor startup (#2382)
The variable 'collapsed' was initialized with the value 'false' because the initial value of the store 'size' was 'undefined'. This caused an instance of CodeMirror to be created at editor startup, regardless of whether the option 'Use HTML editor by default' was enabled, which significantly slowed down the startup of the editor, especially when there were many fields in the notetype.
This commit is contained in:
parent
39ab53d22a
commit
f3b2dbd31f
@ -18,7 +18,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||
}
|
||||
$: duration = dynamicDuration(contentHeight);
|
||||
|
||||
const size = tweened<number>(undefined);
|
||||
const size = tweened<number>(0);
|
||||
|
||||
async function transition(collapse: boolean): Promise<void> {
|
||||
if (collapse) {
|
||||
|
Loading…
Reference in New Issue
Block a user