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.
Commit
1c750076278c945c5790460a41b0f61cd1da4ea999ef6daad455a1f822704d5a
Parent
24e050a0be0e07c…
2 files changed
+2
-2
+8
+2
-2
| --- src/fossil.page.chat.js | ||
| +++ src/fossil.page.chat.js | ||
| @@ -1375,11 +1375,11 @@ | ||
| 1375 | 1375 | has since been resolved by emiting a stricter |
| 1376 | 1376 | format. */ |
| 1377 | 1377 | // Date doesn't work, so dumb it down... |
| 1378 | 1378 | D.append(this.e, D.append(D.span(), eMsg.dataset.timestamp," zulu")); |
| 1379 | 1379 | } |
| 1380 | - const toolbar = D.addClass(D.div(), 'toolbar'); | |
| 1380 | + const toolbar = D.addClass(D.div(), 'toolbar', 'hide-in-zoom'); | |
| 1381 | 1381 | D.append(this.e, toolbar); |
| 1382 | 1382 | const self = this; |
| 1383 | 1383 | |
| 1384 | 1384 | const btnDeleteLocal = D.button("Delete locally"); |
| 1385 | 1385 | D.append(toolbar, btnDeleteLocal); |
| @@ -1408,11 +1408,11 @@ | ||
| 1408 | 1408 | self.hide(); |
| 1409 | 1409 | Chat.deleteMessage(eMsg); |
| 1410 | 1410 | } |
| 1411 | 1411 | }); |
| 1412 | 1412 | } |
| 1413 | - const toolbar3 = D.addClass(D.div(), 'toolbar'); | |
| 1413 | + const toolbar3 = D.addClass(D.div(), 'toolbar', 'hide-in-zoom'); | |
| 1414 | 1414 | D.append(this.e, toolbar3); |
| 1415 | 1415 | D.append(toolbar3, D.button( |
| 1416 | 1416 | "Locally remove all previous messages", |
| 1417 | 1417 | function(){ |
| 1418 | 1418 | self.hide(); |
| 1419 | 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'); |
| 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 |
+8
| --- src/style.chat.css | ||
| +++ src/style.chat.css | ||
| @@ -485,10 +485,18 @@ | ||
| 485 | 485 | body.chat #chat-zoom-content > .message-widget { |
| 486 | 486 | flex-grow: 1; |
| 487 | 487 | } |
| 488 | 488 | body.chat #chat-zoom-content > .message-widget > .message-widget-content { |
| 489 | 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; | |
| 490 | 498 | } |
| 491 | 499 | body.chat #chat-config #chat-config-options { |
| 492 | 500 | /* /chat config options go here */ |
| 493 | 501 | flex: 1 1 auto; |
| 494 | 502 | display: flex; |
| 495 | 503 |
| --- 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 |