Fossil SCM

The various /chat Delete buttons misinteract with zoom mode's moving-around of the message widget within the DOM, so hide those buttons in zoom mode.

stephan 2025-11-27 14:11 trunk
Commit 1c750076278c945c5790460a41b0f61cd1da4ea999ef6daad455a1f822704d5a
--- src/fossil.page.chat.js
+++ src/fossil.page.chat.js
@@ -1375,11 +1375,11 @@
13751375
has since been resolved by emiting a stricter
13761376
format. */
13771377
// Date doesn't work, so dumb it down...
13781378
D.append(this.e, D.append(D.span(), eMsg.dataset.timestamp," zulu"));
13791379
}
1380
- const toolbar = D.addClass(D.div(), 'toolbar');
1380
+ const toolbar = D.addClass(D.div(), 'toolbar', 'hide-in-zoom');
13811381
D.append(this.e, toolbar);
13821382
const self = this;
13831383
13841384
const btnDeleteLocal = D.button("Delete locally");
13851385
D.append(toolbar, btnDeleteLocal);
@@ -1408,11 +1408,11 @@
14081408
self.hide();
14091409
Chat.deleteMessage(eMsg);
14101410
}
14111411
});
14121412
}
1413
- const toolbar3 = D.addClass(D.div(), 'toolbar');
1413
+ const toolbar3 = D.addClass(D.div(), 'toolbar', 'hide-in-zoom');
14141414
D.append(this.e, toolbar3);
14151415
D.append(toolbar3, D.button(
14161416
"Locally remove all previous messages",
14171417
function(){
14181418
self.hide();
14191419
--- src/fossil.page.chat.js
+++ src/fossil.page.chat.js
@@ -1375,11 +1375,11 @@
1375 has since been resolved by emiting a stricter
1376 format. */
1377 // Date doesn't work, so dumb it down...
1378 D.append(this.e, D.append(D.span(), eMsg.dataset.timestamp," zulu"));
1379 }
1380 const toolbar = D.addClass(D.div(), 'toolbar');
1381 D.append(this.e, toolbar);
1382 const self = this;
1383
1384 const btnDeleteLocal = D.button("Delete locally");
1385 D.append(toolbar, btnDeleteLocal);
@@ -1408,11 +1408,11 @@
1408 self.hide();
1409 Chat.deleteMessage(eMsg);
1410 }
1411 });
1412 }
1413 const toolbar3 = D.addClass(D.div(), 'toolbar');
1414 D.append(this.e, toolbar3);
1415 D.append(toolbar3, D.button(
1416 "Locally remove all previous messages",
1417 function(){
1418 self.hide();
1419
--- src/fossil.page.chat.js
+++ src/fossil.page.chat.js
@@ -1375,11 +1375,11 @@
1375 has since been resolved by emiting a stricter
1376 format. */
1377 // Date doesn't work, so dumb it down...
1378 D.append(this.e, D.append(D.span(), eMsg.dataset.timestamp," zulu"));
1379 }
1380 const toolbar = D.addClass(D.div(), 'toolbar', 'hide-in-zoom');
1381 D.append(this.e, toolbar);
1382 const self = this;
1383
1384 const btnDeleteLocal = D.button("Delete locally");
1385 D.append(toolbar, btnDeleteLocal);
@@ -1408,11 +1408,11 @@
1408 self.hide();
1409 Chat.deleteMessage(eMsg);
1410 }
1411 });
1412 }
1413 const toolbar3 = D.addClass(D.div(), 'toolbar', 'hide-in-zoom');
1414 D.append(this.e, toolbar3);
1415 D.append(toolbar3, D.button(
1416 "Locally remove all previous messages",
1417 function(){
1418 self.hide();
1419
--- src/style.chat.css
+++ src/style.chat.css
@@ -485,10 +485,18 @@
485485
body.chat #chat-zoom-content > .message-widget {
486486
flex-grow: 1;
487487
}
488488
body.chat #chat-zoom-content > .message-widget > .message-widget-content {
489489
width: 100%;
490
+}
491
+body.chat #chat-zoom-content > .message-widget .toolbar.hide-in-zoom {
492
+ /* The various Delete buttons misinteract with zoom mode's moving-around
493
+ of message widgets, so hide them in zoom mode. */
494
+ position: absolute !important;
495
+ opacity: 0 !important;
496
+ pointer-events: none !important;
497
+ display: none !important;
490498
}
491499
body.chat #chat-config #chat-config-options {
492500
/* /chat config options go here */
493501
flex: 1 1 auto;
494502
display: flex;
495503
--- src/style.chat.css
+++ src/style.chat.css
@@ -485,10 +485,18 @@
485 body.chat #chat-zoom-content > .message-widget {
486 flex-grow: 1;
487 }
488 body.chat #chat-zoom-content > .message-widget > .message-widget-content {
489 width: 100%;
 
 
 
 
 
 
 
 
490 }
491 body.chat #chat-config #chat-config-options {
492 /* /chat config options go here */
493 flex: 1 1 auto;
494 display: flex;
495
--- src/style.chat.css
+++ src/style.chat.css
@@ -485,10 +485,18 @@
485 body.chat #chat-zoom-content > .message-widget {
486 flex-grow: 1;
487 }
488 body.chat #chat-zoom-content > .message-widget > .message-widget-content {
489 width: 100%;
490 }
491 body.chat #chat-zoom-content > .message-widget .toolbar.hide-in-zoom {
492 /* The various Delete buttons misinteract with zoom mode's moving-around
493 of message widgets, so hide them in zoom mode. */
494 position: absolute !important;
495 opacity: 0 !important;
496 pointer-events: none !important;
497 display: none !important;
498 }
499 body.chat #chat-config #chat-config-options {
500 /* /chat config options go here */
501 flex: 1 1 auto;
502 display: flex;
503

Keyboard Shortcuts

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