fdsa
This commit is contained in:
@@ -2575,21 +2575,12 @@ body.layout-legacy #comments-container.faded-out {
|
|||||||
|
|
||||||
.cf-attachment.cf-image img {
|
.cf-attachment.cf-image img {
|
||||||
max-width: 300px;
|
max-width: 300px;
|
||||||
max-height: 220px;
|
|
||||||
object-fit: contain;
|
object-fit: contain;
|
||||||
border: 1px solid rgba(255, 255, 255, 0.08);
|
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: opacity 0.15s;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cf-attachment.cf-image img:hover {
|
|
||||||
opacity: 0.85;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.cf-attachment.cf-video video {
|
.cf-attachment.cf-video video {
|
||||||
max-width: 400px;
|
max-width: 400px;
|
||||||
max-height: 280px;
|
|
||||||
border: 1px solid rgba(255, 255, 255, 0.08);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.cf-attachment.cf-audio audio {
|
.cf-attachment.cf-audio audio {
|
||||||
|
|||||||
@@ -6040,7 +6040,12 @@ class NotificationSystem {
|
|||||||
const container = window.commentSystem.container;
|
const container = window.commentSystem.container;
|
||||||
const isAttached = container && document.contains(container);
|
const isAttached = container && document.contains(container);
|
||||||
const userTyping = isAttached && container.querySelector('textarea:focus, input:focus');
|
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.
|
// Kill the stabilization ResizeObserver SYNCHRONOUSLY before anything else.
|
||||||
// If it's still alive from the initial anchor-load, it will fire when the
|
// 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.
|
// browser repaints the tab and re-scroll to the comment — that's the bug.
|
||||||
|
|||||||
Reference in New Issue
Block a user