Skip to content

Commit ee6b671

Browse files
authored
Merge pull request #144 from SpringRoll/release/2.4.1
Release 2.4.1
2 parents b67b51e + 1e2a22a commit ee6b671

File tree

9 files changed

+12287
-3339
lines changed

9 files changed

+12287
-3339
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [2.4.1] 2022-12-30
9+
10+
### Fixed
11+
12+
- Fixed PausePlugin focus management so game pauses/unpauses properly on load
13+
814
## [2.4.0] 2022-07-05
915

1016
## Added

dist/SpringRoll-Container-umd.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/SpringRoll-Container-umd.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

Lines changed: 8220 additions & 33 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "springroll-container",
3-
"version": "2.4.0",
3+
"version": "2.4.1",
44
"description": "The iframe controller for interacting with SpringRoll applications",
55
"main": "./dist/index.js",
66
"license": "MIT",

src/plugins/PausePlugin.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,7 @@ export class PausePlugin extends ButtonPlugin {
7070
this._paused = paused;
7171

7272
this.client.send(PausePlugin.pauseKey, paused);
73-
this.client.trigger(paused ? 'paused' : 'resumed', {
74-
paused: paused
75-
});
73+
this.client.trigger(paused ? 'paused' : 'resumed', { paused });
7674

7775
for (let i = 0, l = this._pauseButton.length; i < l; i++) {
7876
this._pauseButton[i].button.classList.remove('unpaused');
@@ -118,7 +116,6 @@ export class PausePlugin extends ButtonPlugin {
118116
return;
119117
}
120118

121-
this._containerBlurred = true;
122119
this.iframe.contentWindow.focus();
123120
}
124121

@@ -208,7 +205,6 @@ export class PausePlugin extends ButtonPlugin {
208205
*/
209206
onContainerFocus() {
210207
this._containerBlurred = false;
211-
this.focusApp();
212208
this.manageFocus();
213209
}
214210

@@ -257,7 +253,7 @@ export class PausePlugin extends ButtonPlugin {
257253
this.client.on('focus', this.onFocus);
258254
this.client.on('keepFocus', this.onKeepFocus);
259255

260-
this.pause = this.pause;
256+
this.pause = this._paused;
261257

262258
//ensure app has focus after setting up plugin
263259
this.focusApp();

yarn.lock

Lines changed: 4054 additions & 3295 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)