Fossil SCM

Doc updates. Fix the (harmless but annoying) warning in the file attachment about the attachment being too large if the attachment-size-limit is not set or is set to 0.

stephan 2026-06-11 10:55 UTC forum-editor-2026
Commit f6785741d98573e7175c34b81156df39cc503b7dffd59da220da1c3c1ef290b3
--- src/fossil.attach.js
+++ src/fossil.attach.js
@@ -504,11 +504,12 @@
504504
img.classList.add('thumbnail');
505505
const reader = new FileReader();
506506
reader.onload = (e)=>img.setAttribute('src', e.target.result);
507507
reader.readAsDataURL(file);
508508
}
509
- if( file.size>F.config.attachmentSizeLimit ){
509
+ if( F.config.attachmentSizeLimit>0
510
+ && file.size>F.config.attachmentSizeLimit ){
510511
/* Problem: tapping this link propagates its click event through
511512
to eDropzone. Thus... */
512513
const eLink = D.a(F.repoUrl('help/attachment-size-limit'),'limit');
513514
eLink.addEventListener('click', ev=>ev.stopPropagation());
514515
this.#rowError(rowObj, "Too large: ", eLink,
515516
--- src/fossil.attach.js
+++ src/fossil.attach.js
@@ -504,11 +504,12 @@
504 img.classList.add('thumbnail');
505 const reader = new FileReader();
506 reader.onload = (e)=>img.setAttribute('src', e.target.result);
507 reader.readAsDataURL(file);
508 }
509 if( file.size>F.config.attachmentSizeLimit ){
 
510 /* Problem: tapping this link propagates its click event through
511 to eDropzone. Thus... */
512 const eLink = D.a(F.repoUrl('help/attachment-size-limit'),'limit');
513 eLink.addEventListener('click', ev=>ev.stopPropagation());
514 this.#rowError(rowObj, "Too large: ", eLink,
515
--- src/fossil.attach.js
+++ src/fossil.attach.js
@@ -504,11 +504,12 @@
504 img.classList.add('thumbnail');
505 const reader = new FileReader();
506 reader.onload = (e)=>img.setAttribute('src', e.target.result);
507 reader.readAsDataURL(file);
508 }
509 if( F.config.attachmentSizeLimit>0
510 && file.size>F.config.attachmentSizeLimit ){
511 /* Problem: tapping this link propagates its click event through
512 to eDropzone. Thus... */
513 const eLink = D.a(F.repoUrl('help/attachment-size-limit'),'limit');
514 eLink.addEventListener('click', ev=>ev.stopPropagation());
515 this.#rowError(rowObj, "Too large: ", eLink,
516
--- src/fossil.page.forumpost.js
+++ src/fossil.page.forumpost.js
@@ -28,18 +28,18 @@
2828
padding when none are active. */
2929
dummyPadding.refs = new Set();
3030
F.dummyPadding = dummyPadding /* only for debugging */;
3131
3232
/**
33
- A WIP forum post editor widget for both new posts and responses.
33
+ A forum post editor widget for new posts and responses.
3434
*/
3535
class ForumPostEditor {
3636
/* Options */
3737
#opt;
3838
/* Dom elements */
3939
#e;
40
- /* Attacher */
40
+ /* F.Attacher instance */
4141
#att;
4242
/* Is waiting on a pending remote response. */
4343
#isWaiting = false;
4444
/* F.TabManager */
4545
#tabs;
@@ -914,11 +914,16 @@
914914
const eStatus = document.querySelector(
915915
'form div.submenu select.submenuctrl[name="status"]'
916916
);
917917
if( eStatus ){
918918
/* Main /forum list. Remove the 'x' form element when eStatus
919
- ** changes, to avoid propagating x when changing the filter. */
919
+ changes, to avoid propagating x when changing the filter.
920
+ The problem this solves: we're browsed to page 3 of status X.
921
+ We change the status filter selection to Y. We're redirected
922
+ to page x, but Y only has 2 posts with that status, so we see
923
+ an empty list. When changing the filter, we need to ensure
924
+ that we start back and that beginning. */
920925
const pForm = eStatus.parentElement?.parentElement;
921926
if( pForm ){
922927
eStatus.addEventListener('change', ()=>{
923928
pForm.querySelector('input[type="hidden"][name="x"]')?.remove?.();
924929
}, true);
@@ -935,12 +940,14 @@
935940
return;
936941
}
937942
form.dataset.submitted = '1';
938943
/** If the user is left waiting "a long time," disable the
939944
resubmit protection. If we don't do this and they tap the
940
- browser's cancel button while waiting, they'll be stuck with
941
- an unsubmittable form. */
945
+ browser's cancel button while waiting, they'll be stuck
946
+ with an unsubmittable form. It can apparently also happen,
947
+ via browser-back, that the form gets left in a submitted
948
+ state. */
942949
setTimeout(()=>{delete form.dataset.submitted}, 7000);
943950
return;
944951
};
945952
946953
document.querySelectorAll("form").forEach(function(form){
@@ -1277,21 +1284,21 @@
12771284
12781285
document.body.querySelectorAll(
12791286
'.forumpost-single-controls > form'
12801287
).forEach(form=>{
12811288
/* For each forum post... */
1289
+ const eThePost = form.parentElement.parentElement/*main post DOM element*/;
1290
+ if( !eThePost?.dataset?.fpid ){
1291
+ /* The server injects these dataset values. */
1292
+ console.warn("Unexpected missing fpid", eThePost);
1293
+ return;
1294
+ }
12821295
const eToDisable = [
12831296
/* List of non-editor DOM elements which need to be disabled
12841297
while the editor is active and re-enabled when it
12851298
closes. */
12861299
];
1287
- const eThePost = form.parentElement.parentElement/*main post DOM element*/;
1288
- if( !eThePost?.dataset?.fpid ){
1289
- /* The server injects these. */
1290
- console.warn("Unexpected missing fpid", eThePost);
1291
- return;
1292
- }
12931300
12941301
const checkButtonForDraft = (draftKeyPrefix, eBtn)=>{
12951302
/* If a draft is found associated with eThePost, mark eBtn
12961303
as a draft and set up storage event listeners to update
12971304
the button as new drafts come and go. */
12981305
--- src/fossil.page.forumpost.js
+++ src/fossil.page.forumpost.js
@@ -28,18 +28,18 @@
28 padding when none are active. */
29 dummyPadding.refs = new Set();
30 F.dummyPadding = dummyPadding /* only for debugging */;
31
32 /**
33 A WIP forum post editor widget for both new posts and responses.
34 */
35 class ForumPostEditor {
36 /* Options */
37 #opt;
38 /* Dom elements */
39 #e;
40 /* Attacher */
41 #att;
42 /* Is waiting on a pending remote response. */
43 #isWaiting = false;
44 /* F.TabManager */
45 #tabs;
@@ -914,11 +914,16 @@
914 const eStatus = document.querySelector(
915 'form div.submenu select.submenuctrl[name="status"]'
916 );
917 if( eStatus ){
918 /* Main /forum list. Remove the 'x' form element when eStatus
919 ** changes, to avoid propagating x when changing the filter. */
 
 
 
 
 
920 const pForm = eStatus.parentElement?.parentElement;
921 if( pForm ){
922 eStatus.addEventListener('change', ()=>{
923 pForm.querySelector('input[type="hidden"][name="x"]')?.remove?.();
924 }, true);
@@ -935,12 +940,14 @@
935 return;
936 }
937 form.dataset.submitted = '1';
938 /** If the user is left waiting "a long time," disable the
939 resubmit protection. If we don't do this and they tap the
940 browser's cancel button while waiting, they'll be stuck with
941 an unsubmittable form. */
 
 
942 setTimeout(()=>{delete form.dataset.submitted}, 7000);
943 return;
944 };
945
946 document.querySelectorAll("form").forEach(function(form){
@@ -1277,21 +1284,21 @@
1277
1278 document.body.querySelectorAll(
1279 '.forumpost-single-controls > form'
1280 ).forEach(form=>{
1281 /* For each forum post... */
 
 
 
 
 
 
1282 const eToDisable = [
1283 /* List of non-editor DOM elements which need to be disabled
1284 while the editor is active and re-enabled when it
1285 closes. */
1286 ];
1287 const eThePost = form.parentElement.parentElement/*main post DOM element*/;
1288 if( !eThePost?.dataset?.fpid ){
1289 /* The server injects these. */
1290 console.warn("Unexpected missing fpid", eThePost);
1291 return;
1292 }
1293
1294 const checkButtonForDraft = (draftKeyPrefix, eBtn)=>{
1295 /* If a draft is found associated with eThePost, mark eBtn
1296 as a draft and set up storage event listeners to update
1297 the button as new drafts come and go. */
1298
--- src/fossil.page.forumpost.js
+++ src/fossil.page.forumpost.js
@@ -28,18 +28,18 @@
28 padding when none are active. */
29 dummyPadding.refs = new Set();
30 F.dummyPadding = dummyPadding /* only for debugging */;
31
32 /**
33 A forum post editor widget for new posts and responses.
34 */
35 class ForumPostEditor {
36 /* Options */
37 #opt;
38 /* Dom elements */
39 #e;
40 /* F.Attacher instance */
41 #att;
42 /* Is waiting on a pending remote response. */
43 #isWaiting = false;
44 /* F.TabManager */
45 #tabs;
@@ -914,11 +914,16 @@
914 const eStatus = document.querySelector(
915 'form div.submenu select.submenuctrl[name="status"]'
916 );
917 if( eStatus ){
918 /* Main /forum list. Remove the 'x' form element when eStatus
919 changes, to avoid propagating x when changing the filter.
920 The problem this solves: we're browsed to page 3 of status X.
921 We change the status filter selection to Y. We're redirected
922 to page x, but Y only has 2 posts with that status, so we see
923 an empty list. When changing the filter, we need to ensure
924 that we start back and that beginning. */
925 const pForm = eStatus.parentElement?.parentElement;
926 if( pForm ){
927 eStatus.addEventListener('change', ()=>{
928 pForm.querySelector('input[type="hidden"][name="x"]')?.remove?.();
929 }, true);
@@ -935,12 +940,14 @@
940 return;
941 }
942 form.dataset.submitted = '1';
943 /** If the user is left waiting "a long time," disable the
944 resubmit protection. If we don't do this and they tap the
945 browser's cancel button while waiting, they'll be stuck
946 with an unsubmittable form. It can apparently also happen,
947 via browser-back, that the form gets left in a submitted
948 state. */
949 setTimeout(()=>{delete form.dataset.submitted}, 7000);
950 return;
951 };
952
953 document.querySelectorAll("form").forEach(function(form){
@@ -1277,21 +1284,21 @@
1284
1285 document.body.querySelectorAll(
1286 '.forumpost-single-controls > form'
1287 ).forEach(form=>{
1288 /* For each forum post... */
1289 const eThePost = form.parentElement.parentElement/*main post DOM element*/;
1290 if( !eThePost?.dataset?.fpid ){
1291 /* The server injects these dataset values. */
1292 console.warn("Unexpected missing fpid", eThePost);
1293 return;
1294 }
1295 const eToDisable = [
1296 /* List of non-editor DOM elements which need to be disabled
1297 while the editor is active and re-enabled when it
1298 closes. */
1299 ];
 
 
 
 
 
 
1300
1301 const checkButtonForDraft = (draftKeyPrefix, eBtn)=>{
1302 /* If a draft is found associated with eThePost, mark eBtn
1303 as a draft and set up storage event listeners to update
1304 the button as new drafts come and go. */
1305

Keyboard Shortcuts

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