Changeset 3700435
- Timestamp:
- 09/17/2026 02:28:53 PM (5 weeks ago)
- Location:
- briqpay-for-woocommerce
- Files:
-
- 6 edited
- 1 copied
-
tags/1.1.15 (copied) (copied from briqpay-for-woocommerce/trunk )
-
tags/1.1.15/assets/js/checkout.js (modified) (2 diffs)
-
tags/1.1.15/briqpay-for-woocommerce.php (modified) (2 diffs)
-
tags/1.1.15/readme.txt (modified) (2 diffs)
-
trunk/assets/js/checkout.js (modified) (2 diffs)
-
trunk/briqpay-for-woocommerce.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
briqpay-for-woocommerce/tags/1.1.15/assets/js/checkout.js
r3699680 r3700435 306 306 307 307 this._containerParked = true; 308 $(document.body).append($container.detach()); 308 309 // Parking must be visually a no-op. The first version simply appended 310 // the container to <body>, which for the whole AJAX roundtrip put the 311 // iframe at the bottom of the page and collapsed the slot it had left 312 // to zero height - so on every refresh the iframe jumped and everything 313 // below the payment box shifted up by the iframe's height, then snapped 314 // back. On a store that refreshes often that reads as the iframe 315 // "bouncing around". Two things prevent it: 316 // 317 // 1. A spacer left behind in the slot, the container's exact height, 318 // so the layout below does not move while the container is away. 319 // It dies with the slot when WooCommerce replaces it, which is fine. 320 // 2. The parked container pinned with position:absolute at the exact 321 // document coordinates it occupied, same width, so it keeps 322 // rendering in precisely the same place. Coordinates are taken 323 // relative to <body>'s own box so this holds whether or not a theme 324 // gives <body> position:relative. 325 // 326 // restoreContainer() runs synchronously inside WooCommerce's own 327 // response handler, in the same task as its fragment replacement, so 328 // the browser never paints the in-between state either. 329 var rect = $container[0].getBoundingClientRect(); 330 var bodyRect = document.body.getBoundingClientRect(); 331 332 var $spacer = $('<div class="briqpay-iframe-spacer" aria-hidden="true"></div>') 333 .css('height', rect.height + 'px'); 334 $container.after($spacer); 335 336 $container.detach().css({ 337 position: 'absolute', 338 top: (rect.top - bodyRect.top) + 'px', 339 left: (rect.left - bodyRect.left) + 'px', 340 width: rect.width + 'px', 341 margin: '0', 342 zIndex: '1' 343 }); 344 $(document.body).append($container); 309 345 310 346 // updated_checkout is not guaranteed to arrive - a failed or superseded … … 341 377 var $container = $('#briqpay-iframe-container'); 342 378 var $slot = $('#briqpay-iframe-slot'); 379 380 // Undo the in-place pinning from parkContainer(). Always, even if there 381 // is no slot to return to - a container left position:absolute at stale 382 // coordinates would be worse than one simply sitting at document.body. 383 $container.css({ position: '', top: '', left: '', width: '', margin: '', zIndex: '' }); 384 385 // The spacer normally dies with the slot WooCommerce replaced. If the 386 // slot was never replaced (the deadline fired instead), it is still 387 // there and must go, or the container returns beneath a blank gap. 388 $('.briqpay-iframe-spacer').remove(); 343 389 344 390 if ($container.length && $slot.length) { -
briqpay-for-woocommerce/tags/1.1.15/briqpay-for-woocommerce.php
r3699680 r3700435 4 4 * Plugin URI: https://github.com/Briqpay-Extensions/briqpay-for-woocommerce 5 5 * Description: Briqpay connects multiple payment providers like Adyen, Stripe, PayPal, and Klarna in one integration. 6 * Version: 1.1.1 46 * Version: 1.1.15 7 7 * Author: Briqpay 8 8 * Author URI: https://briqpay.com … … 23 23 24 24 // Define plugin constants 25 define('BRIQPAY_WC_VERSION', '1.1.1 4');25 define('BRIQPAY_WC_VERSION', '1.1.15'); 26 26 define('BRIQPAY_WC_PLUGIN_FILE', __FILE__); 27 27 define('BRIQPAY_WC_PATH', plugin_dir_path(__FILE__)); -
briqpay-for-woocommerce/tags/1.1.15/readme.txt
r3699680 r3700435 6 6 Tested up to: 7.1 7 7 Requires PHP: 7.4 8 Stable tag: 1.1.1 48 Stable tag: 1.1.15 9 9 License: GPLv2 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 97 97 98 98 == Changelog == 99 100 = 1.1.15 = 101 * Fix: On the classic and B2B checkout, the payment window visibly jumped on every checkout refresh, and everything below it shifted up and snapped back. Regression in 1.1.14: to survive WooCommerce rebuilding the payment box, that release moved the live iframe out of the box for the duration of the refresh - but simply moved it to the end of the page, so for the whole request the iframe sat at the bottom of the page while the space it had left collapsed to nothing. On a store that refreshes the checkout often (a VAT plugin validating in the background, for instance) that reads as the payment window bouncing around. The move is now invisible: the space it leaves is held open at exactly its height, and the iframe itself is pinned at precisely the position it occupied, so nothing on the page moves at any point. The iframe still survives the refresh untouched, as 1.1.14 intended. Confirmed against the bounce reproduced live, before and after. 99 102 100 103 = 1.1.14 = -
briqpay-for-woocommerce/trunk/assets/js/checkout.js
r3699680 r3700435 306 306 307 307 this._containerParked = true; 308 $(document.body).append($container.detach()); 308 309 // Parking must be visually a no-op. The first version simply appended 310 // the container to <body>, which for the whole AJAX roundtrip put the 311 // iframe at the bottom of the page and collapsed the slot it had left 312 // to zero height - so on every refresh the iframe jumped and everything 313 // below the payment box shifted up by the iframe's height, then snapped 314 // back. On a store that refreshes often that reads as the iframe 315 // "bouncing around". Two things prevent it: 316 // 317 // 1. A spacer left behind in the slot, the container's exact height, 318 // so the layout below does not move while the container is away. 319 // It dies with the slot when WooCommerce replaces it, which is fine. 320 // 2. The parked container pinned with position:absolute at the exact 321 // document coordinates it occupied, same width, so it keeps 322 // rendering in precisely the same place. Coordinates are taken 323 // relative to <body>'s own box so this holds whether or not a theme 324 // gives <body> position:relative. 325 // 326 // restoreContainer() runs synchronously inside WooCommerce's own 327 // response handler, in the same task as its fragment replacement, so 328 // the browser never paints the in-between state either. 329 var rect = $container[0].getBoundingClientRect(); 330 var bodyRect = document.body.getBoundingClientRect(); 331 332 var $spacer = $('<div class="briqpay-iframe-spacer" aria-hidden="true"></div>') 333 .css('height', rect.height + 'px'); 334 $container.after($spacer); 335 336 $container.detach().css({ 337 position: 'absolute', 338 top: (rect.top - bodyRect.top) + 'px', 339 left: (rect.left - bodyRect.left) + 'px', 340 width: rect.width + 'px', 341 margin: '0', 342 zIndex: '1' 343 }); 344 $(document.body).append($container); 309 345 310 346 // updated_checkout is not guaranteed to arrive - a failed or superseded … … 341 377 var $container = $('#briqpay-iframe-container'); 342 378 var $slot = $('#briqpay-iframe-slot'); 379 380 // Undo the in-place pinning from parkContainer(). Always, even if there 381 // is no slot to return to - a container left position:absolute at stale 382 // coordinates would be worse than one simply sitting at document.body. 383 $container.css({ position: '', top: '', left: '', width: '', margin: '', zIndex: '' }); 384 385 // The spacer normally dies with the slot WooCommerce replaced. If the 386 // slot was never replaced (the deadline fired instead), it is still 387 // there and must go, or the container returns beneath a blank gap. 388 $('.briqpay-iframe-spacer').remove(); 343 389 344 390 if ($container.length && $slot.length) { -
briqpay-for-woocommerce/trunk/briqpay-for-woocommerce.php
r3699680 r3700435 4 4 * Plugin URI: https://github.com/Briqpay-Extensions/briqpay-for-woocommerce 5 5 * Description: Briqpay connects multiple payment providers like Adyen, Stripe, PayPal, and Klarna in one integration. 6 * Version: 1.1.1 46 * Version: 1.1.15 7 7 * Author: Briqpay 8 8 * Author URI: https://briqpay.com … … 23 23 24 24 // Define plugin constants 25 define('BRIQPAY_WC_VERSION', '1.1.1 4');25 define('BRIQPAY_WC_VERSION', '1.1.15'); 26 26 define('BRIQPAY_WC_PLUGIN_FILE', __FILE__); 27 27 define('BRIQPAY_WC_PATH', plugin_dir_path(__FILE__)); -
briqpay-for-woocommerce/trunk/readme.txt
r3699680 r3700435 6 6 Tested up to: 7.1 7 7 Requires PHP: 7.4 8 Stable tag: 1.1.1 48 Stable tag: 1.1.15 9 9 License: GPLv2 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 97 97 98 98 == Changelog == 99 100 = 1.1.15 = 101 * Fix: On the classic and B2B checkout, the payment window visibly jumped on every checkout refresh, and everything below it shifted up and snapped back. Regression in 1.1.14: to survive WooCommerce rebuilding the payment box, that release moved the live iframe out of the box for the duration of the refresh - but simply moved it to the end of the page, so for the whole request the iframe sat at the bottom of the page while the space it had left collapsed to nothing. On a store that refreshes the checkout often (a VAT plugin validating in the background, for instance) that reads as the payment window bouncing around. The move is now invisible: the space it leaves is held open at exactly its height, and the iframe itself is pinned at precisely the position it occupied, so nothing on the page moves at any point. The iframe still survives the refresh untouched, as 1.1.14 intended. Confirmed against the bounce reproduced live, before and after. 99 102 100 103 = 1.1.14 =
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)