Fossil SCM
Delay the initial filepage loadFile() until a windows.load event. This seems to eliminate what appears to have been a race between that call and the filepage init code.
Commit
07d0bcc598fdbbfd09580290b1091e66d6d87849f0d883a60751283b5e7997d8
Parent
3733293a0125a4d…
1 file changed
+2
-1
+2
-1
| --- src/fileedit.c | ||
| +++ src/fileedit.c | ||
| @@ -1812,11 +1812,12 @@ | ||
| 1812 | 1812 | |
| 1813 | 1813 | CX("</div>"/*#fileedit-tab-commit*/); |
| 1814 | 1814 | |
| 1815 | 1815 | /* Dynamically populate the editor... */ |
| 1816 | 1816 | blob_appendf(&endScript, |
| 1817 | - "fossil.page.loadFile('%j','%j');", | |
| 1817 | + "window.addEventListener('load'," | |
| 1818 | + "()=>fossil.page.loadFile('%j','%j'), false);\n", | |
| 1818 | 1819 | zFilename, cimi.zParentUuid); |
| 1819 | 1820 | |
| 1820 | 1821 | end_footer: |
| 1821 | 1822 | if(stmt.pStmt){ |
| 1822 | 1823 | db_finalize(&stmt); |
| 1823 | 1824 |
| --- src/fileedit.c | |
| +++ src/fileedit.c | |
| @@ -1812,11 +1812,12 @@ | |
| 1812 | |
| 1813 | CX("</div>"/*#fileedit-tab-commit*/); |
| 1814 | |
| 1815 | /* Dynamically populate the editor... */ |
| 1816 | blob_appendf(&endScript, |
| 1817 | "fossil.page.loadFile('%j','%j');", |
| 1818 | zFilename, cimi.zParentUuid); |
| 1819 | |
| 1820 | end_footer: |
| 1821 | if(stmt.pStmt){ |
| 1822 | db_finalize(&stmt); |
| 1823 |
| --- src/fileedit.c | |
| +++ src/fileedit.c | |
| @@ -1812,11 +1812,12 @@ | |
| 1812 | |
| 1813 | CX("</div>"/*#fileedit-tab-commit*/); |
| 1814 | |
| 1815 | /* Dynamically populate the editor... */ |
| 1816 | blob_appendf(&endScript, |
| 1817 | "window.addEventListener('load'," |
| 1818 | "()=>fossil.page.loadFile('%j','%j'), false);\n", |
| 1819 | zFilename, cimi.zParentUuid); |
| 1820 | |
| 1821 | end_footer: |
| 1822 | if(stmt.pStmt){ |
| 1823 | db_finalize(&stmt); |
| 1824 |