Fossil SCM

While the forum editor is open, also disable the post's Close, Delete, and Attach buttons because those will change the current page. Presumably nobody wants to close or delete during an edit, and attachment can be done via the editor form.

stephan 2026-06-13 07:55 UTC forum-editor-2026
Commit 778b397274e6e892fc0f5e554fa6eadef6035feccc91fd0158d91a47c32e379f
--- src/fossil.page.forumpost.js
+++ src/fossil.page.forumpost.js
@@ -1349,14 +1349,15 @@
13491349
button because it would redirect mid-edit. We wouldn't lose
13501350
the edits but would lose any pending attachments. We work
13511351
around this by disabling this selection and adding a new
13521352
status selection widget in the editor, inheriting this
13531353
one's value. */
1354
- const eStatusChange = eThePost.querySelector(
1355
- ':scope > fieldset.forum-status-selection'
1356
- );
1357
- if( eStatusChange ) eToDisable.push(eStatusChange);
1354
+ eThePost.querySelectorAll(
1355
+ 'fieldset.forum-status-selection,'+
1356
+ '.forumpost-single-controls input[type=button],'+
1357
+ '.forumpost-single-controls input[type=submit]'
1358
+ ).forEach(ee=>eToDisable.push(ee));
13581359
})/*for-each form*/;
13591360
13601361
}/* /forumpost and /forumthread */
13611362
13621363
document.body.querySelectorAll('.remove-on-load').forEach(e=>e.remove());
13631364
--- src/fossil.page.forumpost.js
+++ src/fossil.page.forumpost.js
@@ -1349,14 +1349,15 @@
1349 button because it would redirect mid-edit. We wouldn't lose
1350 the edits but would lose any pending attachments. We work
1351 around this by disabling this selection and adding a new
1352 status selection widget in the editor, inheriting this
1353 one's value. */
1354 const eStatusChange = eThePost.querySelector(
1355 ':scope > fieldset.forum-status-selection'
1356 );
1357 if( eStatusChange ) eToDisable.push(eStatusChange);
 
1358 })/*for-each form*/;
1359
1360 }/* /forumpost and /forumthread */
1361
1362 document.body.querySelectorAll('.remove-on-load').forEach(e=>e.remove());
1363
--- src/fossil.page.forumpost.js
+++ src/fossil.page.forumpost.js
@@ -1349,14 +1349,15 @@
1349 button because it would redirect mid-edit. We wouldn't lose
1350 the edits but would lose any pending attachments. We work
1351 around this by disabling this selection and adding a new
1352 status selection widget in the editor, inheriting this
1353 one's value. */
1354 eThePost.querySelectorAll(
1355 'fieldset.forum-status-selection,'+
1356 '.forumpost-single-controls input[type=button],'+
1357 '.forumpost-single-controls input[type=submit]'
1358 ).forEach(ee=>eToDisable.push(ee));
1359 })/*for-each form*/;
1360
1361 }/* /forumpost and /forumthread */
1362
1363 document.body.querySelectorAll('.remove-on-load').forEach(e=>e.remove());
1364

Keyboard Shortcuts

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