diff --git a/src/css-regions/polyfill.js b/src/css-regions/polyfill.js index 64925f0..9ce8208 100644 --- a/src/css-regions/polyfill.js +++ b/src/css-regions/polyfill.js @@ -536,7 +536,7 @@ module.exports = (function(window, document) { "use strict"; // now, let's try to find a break-before/break-after element before the splitting point var current = r.endContainer; if(current.hasChildNodes()) { if(r.endOffset>0) { current=current.childNodes[r.endOffset-1] } }; - var first = r.endContainer.firstChild; + var first = region.firstElementChild; do { if(current.style) {