Skip to content

Commit

Permalink
Merge pull request #20 from xsolla/COMMERCE-4315__fix_layout_shift
Browse files Browse the repository at this point in the history
fix [COMMERCE-4315] layout shift on paystation opening
  • Loading branch information
v-legotkin authored Sep 10, 2020
2 parents 18b1357 + 9791e7c commit 97c5691
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 11 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 1.2.1 - 2020-09-08

- [fix] Prevent layout shift when PayStation is opening in Chrome

## 1.2.0 - 2020-04-17

- [feature] Add ability to pass custom payment URL
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Features:

#### Linking to Xsolla CDN

Script is located on our CDN and is available here: [https://cdn.xsolla.net/embed/paystation/1.2.0/widget.min.js](https://cdn.xsolla.net/embed/paystation/1.2.0/widget.min.js). Use this URL to integrate script on your website.
Script is located on our CDN and is available here: [https://cdn.xsolla.net/embed/paystation/1.2.1/widget.min.js](https://cdn.xsolla.net/embed/paystation/1.2.1/widget.min.js). Use this URL to integrate script on your website.

#### Installing with Bower

Expand All @@ -37,7 +37,7 @@ $ bower install xsolla-paystation-widget
var s = document.createElement('script');
s.type = "text/javascript";
s.async = true;
s.src = "//cdn.xsolla.net/embed/paystation/1.2.0/widget.min.js";
s.src = "//cdn.xsolla.net/embed/paystation/1.2.1/widget.min.js";
s.addEventListener('load', function (e) {
XPayStationWidget.init(options);
}, false);
Expand All @@ -49,7 +49,7 @@ $ bower install xsolla-paystation-widget
#### Synchronous loading (blocks content)

``` javascript
<script src="//cdn.xsolla.net/embed/paystation/1.2.0/widget.min.js"></script>
<script src="//cdn.xsolla.net/embed/paystation/1.2.1/widget.min.js"></script>
<script>
XPayStationWidget.init({
access_token: 'abcdef1234567890abcdef1234567890'
Expand Down
8 changes: 5 additions & 3 deletions dist/widget.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/widget.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/widget.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "xsolla-paystation-widget",
"version": "1.1.0",
"version": "1.2.1",
"description": "PayStation 3 Integration Widget",
"dependencies": {},
"devDependencies": {
Expand Down
2 changes: 2 additions & 0 deletions src/lightbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,8 @@ module.exports = (function () {

lightBoxContentElement.style.backgroundColor = options.contentBackground;
lightBoxContentElement.style.margin = withDefaultPXUnit(options.contentMargin);
lightBoxContentElement.style.width = options.width ? withDefaultPXUnit(options.width) : 'auto';
lightBoxContentElement.style.height = options.height ? withDefaultPXUnit(options.height) : 'auto';

if (options.spinnerColor) {
lightBoxSpinnerElement.querySelector('path').style.fill = options.spinnerColor;
Expand Down
2 changes: 1 addition & 1 deletion src/version.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
module.exports = '1.2.0';
module.exports = '1.2.1';

0 comments on commit 97c5691

Please sign in to comment.