Fossil SCM

Set /chat's default input mode to contenteditable and document why.

stephan 2026-08-16 06:18 UTC trunk
Commit df37d216966b23a9de50a66bcce6d13d18d28d4318fc47909f2e31d12b99236b
1 file changed +28 -8
--- src/fossil.page.chat.js
+++ src/fossil.page.chat.js
@@ -1,6 +1,6 @@
1
--/**
1
+/**
22
This file contains the client-side implementation of fossil's /chat
33
application.
44
*/
55
window.fossil.onPageLoad(function(){
66
const F = window.fossil, D = F.dom;
@@ -530,11 +530,20 @@
530530
which gets played when new messages arrive. When true,
531531
the first entry in the audio file selection list will be
532532
used. */
533533
"audible-alert": true,
534534
/*
535
- */
535
+ When on, /chat will beep only once after the tab is hidden
536
+ from view. Interacting with /chat will reset it, such that
537
+ it beeps only once after being subsequently hidden. When
538
+ this is off it beeps for each new message.
539
+
540
+ In other words: this works like most notifications on
541
+ Android: it only beeps once, then not again until you
542
+ interact with it, which resets the beep for the next
543
+ notification.
544
+ */
536545
"beep-once": false,
537546
/* When on, show the list of "active" users - those from
538547
whom we have messages in the currently-loaded history
539548
(noting that deletions are also messages). */
540549
"active-user-list": false,
@@ -543,16 +552,27 @@
543552
"active-user-list-timestamps": false,
544553
/* When on, the [audible-alert] is played for one's own
545554
messages, else it is only played for other users'
546555
messages. */
547556
"alert-own-messages": false,
548
- /* "Experimental mode" input: use a contenteditable field
549
- for input. This is generally more comfortable to use,
550
- and more modern, than plain text input fields, but
551
- the list of browser-specific quirks and bugs is...
552
- not short. */
553
- "edit-widget-x": false
557
+ /* Use a contenteditable field for input. This is generally
558
+ more comfortable to use, and more modern, than plain text
559
+ input fields. In its early years the contenteditable
560
+ capability had some browser-specific quirks which made is
561
+ difficult on some clients so was opt-in rather than
562
+ opt-out. In recent years (2023+) those quirks have been
563
+ limited to an occasional injection of an extraneous
564
+ newline, and this method really is more comfortable to
565
+ use, so the default was changed to true on 2026-08-16.
566
+
567
+ Historical note: the name of this option is unfortunately
568
+ vague. The "X" originally stood for "experimental". It's
569
+ not been renamed because changing this default out from
570
+ under long-running /chat clients on their next reload
571
+ seems too disruptive to justify such an
572
+ internal-cosmetics-only change. */
573
+ "edit-widget-x": true
554574
}
555575
},
556576
/** Plays a new-message notification sound IF the audible-alert
557577
setting is true, else this is a no-op. Returns this.
558578
*/
559579
--- src/fossil.page.chat.js
+++ src/fossil.page.chat.js
@@ -1,6 +1,6 @@
1 -/**
2 This file contains the client-side implementation of fossil's /chat
3 application.
4 */
5 window.fossil.onPageLoad(function(){
6 const F = window.fossil, D = F.dom;
@@ -530,11 +530,20 @@
530 which gets played when new messages arrive. When true,
531 the first entry in the audio file selection list will be
532 used. */
533 "audible-alert": true,
534 /*
535 */
 
 
 
 
 
 
 
 
 
536 "beep-once": false,
537 /* When on, show the list of "active" users - those from
538 whom we have messages in the currently-loaded history
539 (noting that deletions are also messages). */
540 "active-user-list": false,
@@ -543,16 +552,27 @@
543 "active-user-list-timestamps": false,
544 /* When on, the [audible-alert] is played for one's own
545 messages, else it is only played for other users'
546 messages. */
547 "alert-own-messages": false,
548 /* "Experimental mode" input: use a contenteditable field
549 for input. This is generally more comfortable to use,
550 and more modern, than plain text input fields, but
551 the list of browser-specific quirks and bugs is...
552 not short. */
553 "edit-widget-x": false
 
 
 
 
 
 
 
 
 
 
 
554 }
555 },
556 /** Plays a new-message notification sound IF the audible-alert
557 setting is true, else this is a no-op. Returns this.
558 */
559
--- src/fossil.page.chat.js
+++ src/fossil.page.chat.js
@@ -1,6 +1,6 @@
1 /**
2 This file contains the client-side implementation of fossil's /chat
3 application.
4 */
5 window.fossil.onPageLoad(function(){
6 const F = window.fossil, D = F.dom;
@@ -530,11 +530,20 @@
530 which gets played when new messages arrive. When true,
531 the first entry in the audio file selection list will be
532 used. */
533 "audible-alert": true,
534 /*
535 When on, /chat will beep only once after the tab is hidden
536 from view. Interacting with /chat will reset it, such that
537 it beeps only once after being subsequently hidden. When
538 this is off it beeps for each new message.
539
540 In other words: this works like most notifications on
541 Android: it only beeps once, then not again until you
542 interact with it, which resets the beep for the next
543 notification.
544 */
545 "beep-once": false,
546 /* When on, show the list of "active" users - those from
547 whom we have messages in the currently-loaded history
548 (noting that deletions are also messages). */
549 "active-user-list": false,
@@ -543,16 +552,27 @@
552 "active-user-list-timestamps": false,
553 /* When on, the [audible-alert] is played for one's own
554 messages, else it is only played for other users'
555 messages. */
556 "alert-own-messages": false,
557 /* Use a contenteditable field for input. This is generally
558 more comfortable to use, and more modern, than plain text
559 input fields. In its early years the contenteditable
560 capability had some browser-specific quirks which made is
561 difficult on some clients so was opt-in rather than
562 opt-out. In recent years (2023+) those quirks have been
563 limited to an occasional injection of an extraneous
564 newline, and this method really is more comfortable to
565 use, so the default was changed to true on 2026-08-16.
566
567 Historical note: the name of this option is unfortunately
568 vague. The "X" originally stood for "experimental". It's
569 not been renamed because changing this default out from
570 under long-running /chat clients on their next reload
571 seems too disruptive to justify such an
572 internal-cosmetics-only change. */
573 "edit-widget-x": true
574 }
575 },
576 /** Plays a new-message notification sound IF the audible-alert
577 setting is true, else this is a no-op. Returns this.
578 */
579

Keyboard Shortcuts

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