mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2026-11-30 01:10:38 +00:00
Keep absolutely positioned feed content from escaping the article body and overlapping the title. Fixes #4566.
This commit is contained in:
1 parent
3c77ea1b0f
commit
137aeaf901
2 files changed
+12
-1
No files matched your search
@@ -6,6 +6,14 @@ html {
|
||||
scrollbar-gutter: stable;
|
||||
}
|
||||
|
||||
/* Keep absolutely positioned feed content from escaping the body and overlapping the title.
|
||||
(.article-body is the Biblioteca theme's name for .articleBody.) */
|
||||
|
||||
.articleBody,
|
||||
.article-body {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
/* This is the activity indicator (currently iOS only) that is used while image zooming */
|
||||
|
||||
.activityIndicatorWrap {
|
||||
|
||||
@@ -31,7 +31,10 @@ function constrainBodyRelativeIframes() {
|
||||
let iframes = document.getElementsByTagName("iframe");
|
||||
|
||||
for (iframe of iframes) {
|
||||
if (iframe.offsetParent === document.body) {
|
||||
// The article body container is positioned, so it — not document.body —
|
||||
// is the offsetParent for iframes with no positioned ancestor in the content.
|
||||
const offsetParent = iframe.offsetParent;
|
||||
if (offsetParent === document.body || (offsetParent && (offsetParent.classList.contains("articleBody") || offsetParent.classList.contains("article-body")))) {
|
||||
let heightAttribute = iframe.style.height;
|
||||
|
||||
if (/%|vw|vh$/i.test(heightAttribute)) {
|
||||
|
||||
Reference in new issue
Block a user