Fossil SCM

Correct re-labeling of the Editing... button after discarding or submiting the edit. Ensure that the editor gets scrolled into view.

stephan 2026-06-08 09:42 UTC forum-editor-2026
Commit 4e81a9ee7b2a8666ceed08701ae0b3ff9816c58643901d791aeab2dc8d17b135
--- src/fossil.page.forumpost.js
+++ src/fossil.page.forumpost.js
@@ -908,11 +908,11 @@
908908
909909
const setupEditReplyElement = (ePost, eButton, eToDisable)=>{
910910
const fpid = ePost.dataset.fpid;
911911
ePost.dataset.originalMarginLeft = ePost.style.marginLeft;
912912
ePost.style.marginLeft = 'initial';
913
- eButton.dataset.originalLabel = eButton.value;
913
+ eButton.dataset.originalLabel = eButton.innerText;
914914
D.disable(eToDisable);
915915
return fpid;
916916
};
917917
918918
const restoreEditReplyElement = (ePost, eButton, eToDisable)=>{
@@ -954,11 +954,10 @@
954954
const editClicked = (form, ePost, eBtnEdit, eToDisable)=>{
955955
const fpid = setupEditReplyElement(ePost, eBtnEdit, eToDisable);
956956
const firt = ePost.dataset.firt;
957957
const fEditHead = ePost.dataset.fedithead;
958958
eBtnEdit.innerText = "Editing...";
959
- F.toast.error("Edit is TODO. fpid="+fpid);
960959
/*
961960
TODOs include:
962961
963962
- Disable editButton.
964963
@@ -990,11 +989,13 @@
990989
edit: artifact,
991990
inReplyTo: firt
992991
});
993992
const w = fpe.widget;
994993
w.style.borderTop = '2px dotted';
994
+ /* Adding an "Editing..." <h3> here adds way too much space */
995995
ePost.append(w);
996
+ w.scrollIntoView();
996997
});
997998
}/*editClicked()*/;
998999
9991000
document.body.querySelectorAll(
10001001
'.forumpost-single-controls > form'
10011002
--- src/fossil.page.forumpost.js
+++ src/fossil.page.forumpost.js
@@ -908,11 +908,11 @@
908
909 const setupEditReplyElement = (ePost, eButton, eToDisable)=>{
910 const fpid = ePost.dataset.fpid;
911 ePost.dataset.originalMarginLeft = ePost.style.marginLeft;
912 ePost.style.marginLeft = 'initial';
913 eButton.dataset.originalLabel = eButton.value;
914 D.disable(eToDisable);
915 return fpid;
916 };
917
918 const restoreEditReplyElement = (ePost, eButton, eToDisable)=>{
@@ -954,11 +954,10 @@
954 const editClicked = (form, ePost, eBtnEdit, eToDisable)=>{
955 const fpid = setupEditReplyElement(ePost, eBtnEdit, eToDisable);
956 const firt = ePost.dataset.firt;
957 const fEditHead = ePost.dataset.fedithead;
958 eBtnEdit.innerText = "Editing...";
959 F.toast.error("Edit is TODO. fpid="+fpid);
960 /*
961 TODOs include:
962
963 - Disable editButton.
964
@@ -990,11 +989,13 @@
990 edit: artifact,
991 inReplyTo: firt
992 });
993 const w = fpe.widget;
994 w.style.borderTop = '2px dotted';
 
995 ePost.append(w);
 
996 });
997 }/*editClicked()*/;
998
999 document.body.querySelectorAll(
1000 '.forumpost-single-controls > form'
1001
--- src/fossil.page.forumpost.js
+++ src/fossil.page.forumpost.js
@@ -908,11 +908,11 @@
908
909 const setupEditReplyElement = (ePost, eButton, eToDisable)=>{
910 const fpid = ePost.dataset.fpid;
911 ePost.dataset.originalMarginLeft = ePost.style.marginLeft;
912 ePost.style.marginLeft = 'initial';
913 eButton.dataset.originalLabel = eButton.innerText;
914 D.disable(eToDisable);
915 return fpid;
916 };
917
918 const restoreEditReplyElement = (ePost, eButton, eToDisable)=>{
@@ -954,11 +954,10 @@
954 const editClicked = (form, ePost, eBtnEdit, eToDisable)=>{
955 const fpid = setupEditReplyElement(ePost, eBtnEdit, eToDisable);
956 const firt = ePost.dataset.firt;
957 const fEditHead = ePost.dataset.fedithead;
958 eBtnEdit.innerText = "Editing...";
 
959 /*
960 TODOs include:
961
962 - Disable editButton.
963
@@ -990,11 +989,13 @@
989 edit: artifact,
990 inReplyTo: firt
991 });
992 const w = fpe.widget;
993 w.style.borderTop = '2px dotted';
994 /* Adding an "Editing..." <h3> here adds way too much space */
995 ePost.append(w);
996 w.scrollIntoView();
997 });
998 }/*editClicked()*/;
999
1000 document.body.querySelectorAll(
1001 '.forumpost-single-controls > form'
1002

Keyboard Shortcuts

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