fixed 修复图片灯箱bug
This commit is contained in:
1 parent
7f379dafd8
commit
df4ef82e4e
2 files changed
+35
-2
No files matched your search
@@ -1694,7 +1694,7 @@ ul {
|
|||||||
color: #111827;
|
color: #111827;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.06);
|
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.06);
|
||||||
z-index: 2147483647; /* Ensure it's on top */
|
z-index: 900; /* Ensure it's on top */
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3460,7 +3460,7 @@ input[type=submit] {
|
|||||||
position: fixed;
|
position: fixed;
|
||||||
bottom: 30px;
|
bottom: 30px;
|
||||||
right: 15px;
|
right: 15px;
|
||||||
z-index: 2147483647;
|
z-index: 900; /* Lowered from max-int to be below modals and lightbox */
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 10px;
|
gap: 10px;
|
||||||
@@ -3471,6 +3471,19 @@ input[type=submit] {
|
|||||||
/* Ensure visibility stability */
|
/* Ensure visibility stability */
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
visibility: visible;
|
visibility: visible;
|
||||||
|
transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.floating-tools.hidden {
|
||||||
|
opacity: 0 !important;
|
||||||
|
visibility: hidden !important;
|
||||||
|
transform: translateZ(0) translateY(20px) !important;
|
||||||
|
pointer-events: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Override ViewImage z-index to ensure it is above floating tools */
|
||||||
|
.view-image {
|
||||||
|
z-index: 2000 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.floating-tools a {
|
.floating-tools a {
|
||||||
|
|||||||
@@ -190,6 +190,26 @@ window.initFloatingTools = function() {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 4. Lightbox Observer (ViewImage)
|
||||||
|
// Hide floating tools when lightbox is open
|
||||||
|
if (window.lightboxObserver) {
|
||||||
|
window.lightboxObserver.disconnect();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (container) {
|
||||||
|
window.lightboxObserver = new MutationObserver(function(mutations) {
|
||||||
|
var lightbox = document.querySelector('.view-image');
|
||||||
|
if (lightbox) {
|
||||||
|
container.classList.add('hidden');
|
||||||
|
} else {
|
||||||
|
container.classList.remove('hidden');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
window.lightboxObserver.observe(document.body, { childList: true });
|
||||||
|
}
|
||||||
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error('Error in initFloatingTools:', e);
|
console.error('Error in initFloatingTools:', e);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user