This commit is contained in:
2026-05-27 19:21:28 +02:00
parent 61754e058f
commit 8909e02ddc
2 changed files with 6 additions and 10 deletions

View File

@@ -2575,21 +2575,12 @@ body.layout-legacy #comments-container.faded-out {
.cf-attachment.cf-image img {
max-width: 300px;
max-height: 220px;
object-fit: contain;
border: 1px solid rgba(255, 255, 255, 0.08);
cursor: pointer;
transition: opacity 0.15s;
}
.cf-attachment.cf-image img:hover {
opacity: 0.85;
}
.cf-attachment.cf-video video {
max-width: 400px;
max-height: 280px;
border: 1px solid rgba(255, 255, 255, 0.08);
}
.cf-attachment.cf-audio audio {

View File

@@ -6040,7 +6040,12 @@ class NotificationSystem {
const container = window.commentSystem.container;
const isAttached = container && document.contains(container);
const userTyping = isAttached && container.querySelector('textarea:focus, input:focus');
if (isAttached && !userTyping) {
// Also skip if a file upload is in progress (e.g. mobile: file picker dismisses
// keyboard so textarea loses focus, but _pendingUploads is still set).
const hasPendingUpload = isAttached && Array.from(
container.querySelectorAll('.comment-input')
).some(wrap => (wrap._pendingUploads || 0) > 0);
if (isAttached && !userTyping && !hasPendingUpload) {
// Kill the stabilization ResizeObserver SYNCHRONOUSLY before anything else.
// If it's still alive from the initial anchor-load, it will fire when the
// browser repaints the tab and re-scroll to the comment — that's the bug.