Merge pull request #12972 from Snuffleupagus/pr-12354-followup
[GENERIC viewer] Skip the `iframe`-case when checking if the `container` div, on `BaseViewer`-instances, is absolutely positioned (PR 12354 follow-up)
This commit is contained in:
commit
3a2c259b57
@ -172,7 +172,10 @@ class BaseViewer {
|
||||
throw new Error("Invalid `container` and/or `viewer` option.");
|
||||
}
|
||||
|
||||
if (getComputedStyle(this.container).position !== "absolute") {
|
||||
if (
|
||||
this.container.offsetParent &&
|
||||
getComputedStyle(this.container).position !== "absolute"
|
||||
) {
|
||||
throw new Error("The `container` must be absolutely positioned.");
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user