Skip to content

Commit 38685ea

Browse files
fix old iframes in chrome
1 parent 795c5fb commit 38685ea

File tree

133 files changed

+532
-133
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

133 files changed

+532
-133
lines changed

core/src/test/kotlin/org/jetbrains/kotlinx/dataframe/explainer/SamplesRenderingUtils.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,10 @@ function getDirectVisibleContentHeight(element) {
8686
function getElementHeight(el) {
8787
const styles = getComputedStyle(el);
8888
const margin = parseFloat(styles.marginTop) + parseFloat(styles.marginBottom);
89-
return el.offsetHeight + margin;
89+
90+
// More reliable cross-browser calculation
91+
const rect = el.getBoundingClientRect();
92+
return rect.height + margin;
9093
}
9194
9295
function isElementVisible(el) {

docs/StardustDocs/resources/snippets/org.jetbrains.kotlinx.dataframe.samples.api.Access.byRow.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -565,7 +565,10 @@
565565
function getElementHeight(el) {
566566
const styles = getComputedStyle(el);
567567
const margin = parseFloat(styles.marginTop) + parseFloat(styles.marginBottom);
568-
return el.offsetHeight + margin;
568+
569+
// More reliable cross-browser calculation
570+
const rect = el.getBoundingClientRect();
571+
return rect.height + margin;
569572
}
570573

571574
function isElementVisible(el) {

docs/StardustDocs/resources/snippets/org.jetbrains.kotlinx.dataframe.samples.api.Access.columnSelectors.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -665,7 +665,10 @@
665665
function getElementHeight(el) {
666666
const styles = getComputedStyle(el);
667667
const margin = parseFloat(styles.marginTop) + parseFloat(styles.marginBottom);
668-
return el.offsetHeight + margin;
668+
669+
// More reliable cross-browser calculation
670+
const rect = el.getBoundingClientRect();
671+
return rect.height + margin;
669672
}
670673

671674
function isElementVisible(el) {

docs/StardustDocs/resources/snippets/org.jetbrains.kotlinx.dataframe.samples.api.Access.columnSelectorsMisc.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -813,7 +813,10 @@
813813
function getElementHeight(el) {
814814
const styles = getComputedStyle(el);
815815
const margin = parseFloat(styles.marginTop) + parseFloat(styles.marginBottom);
816-
return el.offsetHeight + margin;
816+
817+
// More reliable cross-browser calculation
818+
const rect = el.getBoundingClientRect();
819+
return rect.height + margin;
817820
}
818821

819822
function isElementVisible(el) {

docs/StardustDocs/resources/snippets/org.jetbrains.kotlinx.dataframe.samples.api.Access.columnSelectorsModifySet.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -617,7 +617,10 @@
617617
function getElementHeight(el) {
618618
const styles = getComputedStyle(el);
619619
const margin = parseFloat(styles.marginTop) + parseFloat(styles.marginBottom);
620-
return el.offsetHeight + margin;
620+
621+
// More reliable cross-browser calculation
622+
const rect = el.getBoundingClientRect();
623+
return rect.height + margin;
621624
}
622625

623626
function isElementVisible(el) {

docs/StardustDocs/resources/snippets/org.jetbrains.kotlinx.dataframe.samples.api.Access.columnSelectorsUsages.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -635,7 +635,10 @@
635635
function getElementHeight(el) {
636636
const styles = getComputedStyle(el);
637637
const margin = parseFloat(styles.marginTop) + parseFloat(styles.marginBottom);
638-
return el.offsetHeight + margin;
638+
639+
// More reliable cross-browser calculation
640+
const rect = el.getBoundingClientRect();
641+
return rect.height + margin;
639642
}
640643

641644
function isElementVisible(el) {

docs/StardustDocs/resources/snippets/org.jetbrains.kotlinx.dataframe.samples.api.Access.columnsSelectorByIndices.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,10 @@
553553
function getElementHeight(el) {
554554
const styles = getComputedStyle(el);
555555
const margin = parseFloat(styles.marginTop) + parseFloat(styles.marginBottom);
556-
return el.offsetHeight + margin;
556+
557+
// More reliable cross-browser calculation
558+
const rect = el.getBoundingClientRect();
559+
return rect.height + margin;
557560
}
558561

559562
function isElementVisible(el) {

docs/StardustDocs/resources/snippets/org.jetbrains.kotlinx.dataframe.samples.api.Access.distinct.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,10 @@
517517
function getElementHeight(el) {
518518
const styles = getComputedStyle(el);
519519
const margin = parseFloat(styles.marginTop) + parseFloat(styles.marginBottom);
520-
return el.offsetHeight + margin;
520+
521+
// More reliable cross-browser calculation
522+
const rect = el.getBoundingClientRect();
523+
return rect.height + margin;
521524
}
522525

523526
function isElementVisible(el) {

docs/StardustDocs/resources/snippets/org.jetbrains.kotlinx.dataframe.samples.api.Access.distinctBy.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -543,7 +543,10 @@
543543
function getElementHeight(el) {
544544
const styles = getComputedStyle(el);
545545
const margin = parseFloat(styles.marginTop) + parseFloat(styles.marginBottom);
546-
return el.offsetHeight + margin;
546+
547+
// More reliable cross-browser calculation
548+
const rect = el.getBoundingClientRect();
549+
return rect.height + margin;
547550
}
548551

549552
function isElementVisible(el) {

docs/StardustDocs/resources/snippets/org.jetbrains.kotlinx.dataframe.samples.api.Access.distinctColumns.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -543,7 +543,10 @@
543543
function getElementHeight(el) {
544544
const styles = getComputedStyle(el);
545545
const margin = parseFloat(styles.marginTop) + parseFloat(styles.marginBottom);
546-
return el.offsetHeight + margin;
546+
547+
// More reliable cross-browser calculation
548+
const rect = el.getBoundingClientRect();
549+
return rect.height + margin;
547550
}
548551

549552
function isElementVisible(el) {

0 commit comments

Comments
 (0)