Fossil SCM
Remove an unnecessary part of the previous checkin.
Commit
d6f86204fe2639ab9709571154b49b28f591d43fb260b4cec92cf5653f087de3
Parent
cb1e0213b3941c1…
1 file changed
+1
-13
+1
-13
| --- src/fossil.page.forumpost.js | ||
| +++ src/fossil.page.forumpost.js | ||
| @@ -16,14 +16,13 @@ | ||
| 16 | 16 | unpredictably as the bottom boundary of the page moves. A weird |
| 17 | 17 | workaround (not invented here) is to add dummy blank padding to |
| 18 | 18 | the page to allow the preview widget to grow and shrink without |
| 19 | 19 | (usually) scrolling, but whether it does so really depends on its |
| 20 | 20 | size. |
| 21 | - | |
| 22 | 21 | */ |
| 23 | 22 | const dummyPadding = D.div(); |
| 24 | - dummyPadding.style.height = '100em'; | |
| 23 | + dummyPadding.style.height = '50em'; | |
| 25 | 24 | /* Keep track of ForumPostEditor instances so we can remove this |
| 26 | 25 | padding when none are active. */ |
| 27 | 26 | dummyPadding.refs = new Set(); |
| 28 | 27 | F.dummyPadding = dummyPadding /* only for debugging */; |
| 29 | 28 | |
| @@ -594,31 +593,20 @@ | ||
| 594 | 593 | /** |
| 595 | 594 | Append the new content then remove the old, to help reduce |
| 596 | 595 | jumping-around of the UI if the preview is cleared then |
| 597 | 596 | repopulated. |
| 598 | 597 | */ |
| 599 | - const dummy = D.div(); | |
| 600 | - dummy.style.height = '50em'; | |
| 601 | - document.body.append(dummy); | |
| 602 | 598 | const preview = this.#e.preview; |
| 603 | 599 | const childs = [...preview.childNodes]; |
| 604 | 600 | D.parseHtml(preview, rawHtml); |
| 605 | 601 | D.remove(childs); |
| 606 | - dummy.remove(); | |
| 607 | 602 | //preview.style.removeProperty('height'); |
| 608 | 603 | if(F.pikchr && 'text/x-markdown'===this.mimetype){ |
| 609 | 604 | F.pikchr.addSrcView( |
| 610 | 605 | preview.querySelectorAll('svg.pikchr') |
| 611 | 606 | ); |
| 612 | 607 | } |
| 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 | 608 | } |
| 621 | 609 | |
| 622 | 610 | async #preview(){ |
| 623 | 611 | if( this.#isWaiting ) return; |
| 624 | 612 | const e = this.#e; |
| 625 | 613 |
| --- 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 |