Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [2.4.1] 2022-12-30

### Fixed

- Fixed PausePlugin focus management so game pauses/unpauses properly on load

## [2.4.0] 2022-07-05

## Added
Expand Down
2 changes: 1 addition & 1 deletion dist/SpringRoll-Container-umd.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/SpringRoll-Container-umd.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index.js

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

8,253 changes: 8,220 additions & 33 deletions package-lock.json

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": "springroll-container",
"version": "2.4.0",
"version": "2.4.1",
"description": "The iframe controller for interacting with SpringRoll applications",
"main": "./dist/index.js",
"license": "MIT",
Expand Down
8 changes: 2 additions & 6 deletions src/plugins/PausePlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,7 @@ export class PausePlugin extends ButtonPlugin {
this._paused = paused;

this.client.send(PausePlugin.pauseKey, paused);
this.client.trigger(paused ? 'paused' : 'resumed', {
paused: paused
});
this.client.trigger(paused ? 'paused' : 'resumed', { paused });

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

this._containerBlurred = true;
this.iframe.contentWindow.focus();
}

Expand Down Expand Up @@ -208,7 +205,6 @@ export class PausePlugin extends ButtonPlugin {
*/
onContainerFocus() {
this._containerBlurred = false;
this.focusApp();
this.manageFocus();
}

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

this.pause = this.pause;
this.pause = this._paused;

//ensure app has focus after setting up plugin
this.focusApp();
Expand Down
7,349 changes: 4,054 additions & 3,295 deletions yarn.lock

Large diffs are not rendered by default.