Skip to content

Commit 2040f76

Browse files
committed
force dom reflow after appending overflow
iOS9 appears to have a race condition and sometimes shows the overflow on top of the ads, even though ALL containers and iframe appear to have the right height set . Adding this to see if it fixes the issue. This doesn’t appear to be a problem for iOS10 or Android.
1 parent a907f54 commit 2040f76

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

ads/google/csa.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,10 @@ function createOverflow(global, overflowH, fullH, container, containerH) {
203203
overflow.appendChild(getOverflowChevron(global));
204204
overflow.onclick = global.context.requestResize.bind(null, undefined, fullH);
205205
global.document.body.appendChild(overflow);
206+
// Force DOM reflow and repaint
207+
/*eslint-disable no-unused-vars*/
208+
const ignore = global.document.body.offsetHeight;
209+
/*eslint-enable no-unused-vars*/
206210
// Resize the CSA container to not conflict with overflow
207211
resizeCsa(container, containerH);
208212
}

0 commit comments

Comments
 (0)