Fossil SCM

Slight forum editor animation tweaks. Add some arguably superfluous "just in case" error handling.

stephan 2026-06-13 10:41 UTC forum-editor-2026
Commit 77b92673aa45e93a7db49850c6e646b16166f2f82392c8663564521bf7e1815c
+2 -2
--- src/default.css
+++ src/default.css
@@ -2128,16 +2128,16 @@
21282128
flex-grow: 2;
21292129
line-height: initial/*work around an inherited alignment quirk*/;
21302130
}
21312131
21322132
.animate-entrance {
2133
- animation: slideFadeIn 0.5s ease-out forwards;
2133
+ animation: slideFadeIn 0.25s linear forwards;
21342134
transform-origin: top;
21352135
overflow: hidden /*prevent content bleeding during expansion*/;
21362136
}
21372137
.animate-exit {
2138
- animation: slideFadeOut 0.5s ease-in forwards;
2138
+ animation: slideFadeOut 0.25s linear forwards;
21392139
transform-origin: top;
21402140
overflow: hidden;
21412141
}
21422142
@keyframes slideFadeIn {
21432143
0% {
21442144
--- src/default.css
+++ src/default.css
@@ -2128,16 +2128,16 @@
2128 flex-grow: 2;
2129 line-height: initial/*work around an inherited alignment quirk*/;
2130 }
2131
2132 .animate-entrance {
2133 animation: slideFadeIn 0.5s ease-out forwards;
2134 transform-origin: top;
2135 overflow: hidden /*prevent content bleeding during expansion*/;
2136 }
2137 .animate-exit {
2138 animation: slideFadeOut 0.5s ease-in forwards;
2139 transform-origin: top;
2140 overflow: hidden;
2141 }
2142 @keyframes slideFadeIn {
2143 0% {
2144
--- src/default.css
+++ src/default.css
@@ -2128,16 +2128,16 @@
2128 flex-grow: 2;
2129 line-height: initial/*work around an inherited alignment quirk*/;
2130 }
2131
2132 .animate-entrance {
2133 animation: slideFadeIn 0.25s linear forwards;
2134 transform-origin: top;
2135 overflow: hidden /*prevent content bleeding during expansion*/;
2136 }
2137 .animate-exit {
2138 animation: slideFadeOut 0.25s linear forwards;
2139 transform-origin: top;
2140 overflow: hidden;
2141 }
2142 @keyframes slideFadeIn {
2143 0% {
2144
--- src/fossil.page.forumpost.js
+++ src/fossil.page.forumpost.js
@@ -753,10 +753,11 @@
753753
if( this.#opt.edit.uuid === j.uuid
754754
&& !j.statusModified && 0===j.attachedCount ){
755755
this.reportError("No changes made.");
756756
}else{
757757
window.location = F.repoUrl('forumpost/'+j.uuid);
758
+ setTimeout(()=>this.close(), 500/*just in case not redirected*/);
758759
}
759760
}
760761
}else{
761762
this.reportError(
762763
"Saving worked but we're ignoring it and staying here."
@@ -1175,11 +1176,11 @@
11751176
/* onsubmit() and ondiscard() callback */
11761177
restoreEditReplyElement(ePost, eBtnReply, fpe);
11771178
//console.debug("ondiscard/onsubmit", fpe, artifact);
11781179
if( response/*onsubmit()*/ ){
11791180
window.location = F.repoUrl('forumpost/'+response.uuid);
1180
- fpe.close();
1181
+ setTimeout(()=>fpe.close(), 500/*just in case not redirected*/);
11811182
}else{/*ondiscard()*/
11821183
}
11831184
};
11841185
const fpe = new F.ForumPostEditor(F.nu({
11851186
hiddenFields: form.querySelectorAll(
@@ -1245,19 +1246,19 @@
12451246
eBtnEdit.innerText = "Editing...";
12461247
fetchPost(fpid)
12471248
.then(artifact=>{
12481249
const ondone = (fpe, response)=>{
12491250
/* onsubmit() and ondiscard() callback */
1250
- //console.debug("ondiscard/onsubmit", fpe);
12511251
if( response/*onsubmit()*/ ){
12521252
if( fpid === response.uuid
12531253
&& !response.statusModified
12541254
&& 0===response.attachedCount ){
12551255
fpe.reportError("No changes made.");
12561256
}else{
12571257
restoreEditReplyElement(ePost, eBtnEdit, fpe);
12581258
window.location = F.repoUrl('forumpost/'+response.uuid);
1259
+ setTimeout(()=>fpe.close(), 500/*just in case not redirected*/);
12591260
}
12601261
}else{
12611262
/*ondiscard()*/
12621263
restoreEditReplyElement(ePost, eBtnEdit, fpe);
12631264
}
12641265
--- src/fossil.page.forumpost.js
+++ src/fossil.page.forumpost.js
@@ -753,10 +753,11 @@
753 if( this.#opt.edit.uuid === j.uuid
754 && !j.statusModified && 0===j.attachedCount ){
755 this.reportError("No changes made.");
756 }else{
757 window.location = F.repoUrl('forumpost/'+j.uuid);
 
758 }
759 }
760 }else{
761 this.reportError(
762 "Saving worked but we're ignoring it and staying here."
@@ -1175,11 +1176,11 @@
1175 /* onsubmit() and ondiscard() callback */
1176 restoreEditReplyElement(ePost, eBtnReply, fpe);
1177 //console.debug("ondiscard/onsubmit", fpe, artifact);
1178 if( response/*onsubmit()*/ ){
1179 window.location = F.repoUrl('forumpost/'+response.uuid);
1180 fpe.close();
1181 }else{/*ondiscard()*/
1182 }
1183 };
1184 const fpe = new F.ForumPostEditor(F.nu({
1185 hiddenFields: form.querySelectorAll(
@@ -1245,19 +1246,19 @@
1245 eBtnEdit.innerText = "Editing...";
1246 fetchPost(fpid)
1247 .then(artifact=>{
1248 const ondone = (fpe, response)=>{
1249 /* onsubmit() and ondiscard() callback */
1250 //console.debug("ondiscard/onsubmit", fpe);
1251 if( response/*onsubmit()*/ ){
1252 if( fpid === response.uuid
1253 && !response.statusModified
1254 && 0===response.attachedCount ){
1255 fpe.reportError("No changes made.");
1256 }else{
1257 restoreEditReplyElement(ePost, eBtnEdit, fpe);
1258 window.location = F.repoUrl('forumpost/'+response.uuid);
 
1259 }
1260 }else{
1261 /*ondiscard()*/
1262 restoreEditReplyElement(ePost, eBtnEdit, fpe);
1263 }
1264
--- src/fossil.page.forumpost.js
+++ src/fossil.page.forumpost.js
@@ -753,10 +753,11 @@
753 if( this.#opt.edit.uuid === j.uuid
754 && !j.statusModified && 0===j.attachedCount ){
755 this.reportError("No changes made.");
756 }else{
757 window.location = F.repoUrl('forumpost/'+j.uuid);
758 setTimeout(()=>this.close(), 500/*just in case not redirected*/);
759 }
760 }
761 }else{
762 this.reportError(
763 "Saving worked but we're ignoring it and staying here."
@@ -1175,11 +1176,11 @@
1176 /* onsubmit() and ondiscard() callback */
1177 restoreEditReplyElement(ePost, eBtnReply, fpe);
1178 //console.debug("ondiscard/onsubmit", fpe, artifact);
1179 if( response/*onsubmit()*/ ){
1180 window.location = F.repoUrl('forumpost/'+response.uuid);
1181 setTimeout(()=>fpe.close(), 500/*just in case not redirected*/);
1182 }else{/*ondiscard()*/
1183 }
1184 };
1185 const fpe = new F.ForumPostEditor(F.nu({
1186 hiddenFields: form.querySelectorAll(
@@ -1245,19 +1246,19 @@
1246 eBtnEdit.innerText = "Editing...";
1247 fetchPost(fpid)
1248 .then(artifact=>{
1249 const ondone = (fpe, response)=>{
1250 /* onsubmit() and ondiscard() callback */
 
1251 if( response/*onsubmit()*/ ){
1252 if( fpid === response.uuid
1253 && !response.statusModified
1254 && 0===response.attachedCount ){
1255 fpe.reportError("No changes made.");
1256 }else{
1257 restoreEditReplyElement(ePost, eBtnEdit, fpe);
1258 window.location = F.repoUrl('forumpost/'+response.uuid);
1259 setTimeout(()=>fpe.close(), 500/*just in case not redirected*/);
1260 }
1261 }else{
1262 /*ondiscard()*/
1263 restoreEditReplyElement(ePost, eBtnEdit, fpe);
1264 }
1265

Keyboard Shortcuts

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