mirror of
https://github.com/ankitects/anki.git
synced 2026-01-13 22:13:58 -05:00
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
4dd151eb11
commit
3f7ba84888
1 changed files with 1 additions and 1 deletions
|
|
@ -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 a new issue