Fossil SCM

Remove an unnecessary part of the previous checkin.

stephan 2026-06-10 08:38 UTC forum-editor-2026
Commit d6f86204fe2639ab9709571154b49b28f591d43fb260b4cec92cf5653f087de3
1 file changed +1 -13
--- src/fossil.page.forumpost.js
+++ src/fossil.page.forumpost.js
@@ -16,14 +16,13 @@
1616
unpredictably as the bottom boundary of the page moves. A weird
1717
workaround (not invented here) is to add dummy blank padding to
1818
the page to allow the preview widget to grow and shrink without
1919
(usually) scrolling, but whether it does so really depends on its
2020
size.
21
-
2221
*/
2322
const dummyPadding = D.div();
24
- dummyPadding.style.height = '100em';
23
+ dummyPadding.style.height = '50em';
2524
/* Keep track of ForumPostEditor instances so we can remove this
2625
padding when none are active. */
2726
dummyPadding.refs = new Set();
2827
F.dummyPadding = dummyPadding /* only for debugging */;
2928
@@ -594,31 +593,20 @@
594593
/**
595594
Append the new content then remove the old, to help reduce
596595
jumping-around of the UI if the preview is cleared then
597596
repopulated.
598597
*/
599
- const dummy = D.div();
600
- dummy.style.height = '50em';
601
- document.body.append(dummy);
602598
const preview = this.#e.preview;
603599
const childs = [...preview.childNodes];
604600
D.parseHtml(preview, rawHtml);
605601
D.remove(childs);
606
- dummy.remove();
607602
//preview.style.removeProperty('height');
608603
if(F.pikchr && 'text/x-markdown'===this.mimetype){
609604
F.pikchr.addSrcView(
610605
preview.querySelectorAll('svg.pikchr')
611606
);
612607
}
613
- if( 0 /* This isn't doing what is desired */
614
- && !F.dom.isElementKindaInViewport(preview, true) ){
615
- /* On the bottom-most post, these widgets sometimes
616
- end up off-screen */
617
- //F.dom.scrollChildIntoView(preview);
618
- preview.scrollIntoView();
619
- }
620608
}
621609
622610
async #preview(){
623611
if( this.#isWaiting ) return;
624612
const e = this.#e;
625613
--- src/fossil.page.forumpost.js
+++ src/fossil.page.forumpost.js
@@ -16,14 +16,13 @@
16 unpredictably as the bottom boundary of the page moves. A weird
17 workaround (not invented here) is to add dummy blank padding to
18 the page to allow the preview widget to grow and shrink without
19 (usually) scrolling, but whether it does so really depends on its
20 size.
21
22 */
23 const dummyPadding = D.div();
24 dummyPadding.style.height = '100em';
25 /* Keep track of ForumPostEditor instances so we can remove this
26 padding when none are active. */
27 dummyPadding.refs = new Set();
28 F.dummyPadding = dummyPadding /* only for debugging */;
29
@@ -594,31 +593,20 @@
594 /**
595 Append the new content then remove the old, to help reduce
596 jumping-around of the UI if the preview is cleared then
597 repopulated.
598 */
599 const dummy = D.div();
600 dummy.style.height = '50em';
601 document.body.append(dummy);
602 const preview = this.#e.preview;
603 const childs = [...preview.childNodes];
604 D.parseHtml(preview, rawHtml);
605 D.remove(childs);
606 dummy.remove();
607 //preview.style.removeProperty('height');
608 if(F.pikchr && 'text/x-markdown'===this.mimetype){
609 F.pikchr.addSrcView(
610 preview.querySelectorAll('svg.pikchr')
611 );
612 }
613 if( 0 /* This isn't doing what is desired */
614 && !F.dom.isElementKindaInViewport(preview, true) ){
615 /* On the bottom-most post, these widgets sometimes
616 end up off-screen */
617 //F.dom.scrollChildIntoView(preview);
618 preview.scrollIntoView();
619 }
620 }
621
622 async #preview(){
623 if( this.#isWaiting ) return;
624 const e = this.#e;
625
--- src/fossil.page.forumpost.js
+++ src/fossil.page.forumpost.js
@@ -16,14 +16,13 @@
16 unpredictably as the bottom boundary of the page moves. A weird
17 workaround (not invented here) is to add dummy blank padding to
18 the page to allow the preview widget to grow and shrink without
19 (usually) scrolling, but whether it does so really depends on its
20 size.
 
21 */
22 const dummyPadding = D.div();
23 dummyPadding.style.height = '50em';
24 /* Keep track of ForumPostEditor instances so we can remove this
25 padding when none are active. */
26 dummyPadding.refs = new Set();
27 F.dummyPadding = dummyPadding /* only for debugging */;
28
@@ -594,31 +593,20 @@
593 /**
594 Append the new content then remove the old, to help reduce
595 jumping-around of the UI if the preview is cleared then
596 repopulated.
597 */
 
 
 
598 const preview = this.#e.preview;
599 const childs = [...preview.childNodes];
600 D.parseHtml(preview, rawHtml);
601 D.remove(childs);
 
602 //preview.style.removeProperty('height');
603 if(F.pikchr && 'text/x-markdown'===this.mimetype){
604 F.pikchr.addSrcView(
605 preview.querySelectorAll('svg.pikchr')
606 );
607 }
 
 
 
 
 
 
 
608 }
609
610 async #preview(){
611 if( this.#isWaiting ) return;
612 const e = this.#e;
613

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button