Skip to content
This repository was archived by the owner on May 8, 2025. It is now read-only.

Commit 005ee21

Browse files
authored
Merge pull request #4 from pbs/feature/pause-on-blur
require manual unpause when app is refocused
2 parents ce37874 + 2eca7ca commit 005ee21

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,14 @@ 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+
## [3.0.0] - 2025-01-03
9+
10+
This is the start of the websquad's fork of https://github.com/springroll/SpringRollContainer to be used in the pbskids redesign (project name "Puma").
11+
12+
### Changed
13+
14+
- Update PausePlugin to require manual unpause when the application window regains focus. [Ticket](https://www.pivotaltracker.com/story/show/188461849)
15+
816
## [2.5.2] - 2024-06-18
917

1018
### Fixed

src/plugins/PausePlugin.js

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -139,10 +139,6 @@ export class PausePlugin extends ButtonPlugin {
139139
if (!this.manageOwnVisibility) {
140140
return;
141141
}
142-
// Unfocus on the iframe
143-
if (this._keepFocus) {
144-
this.blurApp();
145-
}
146142

147143
// we only need one delayed call, at the end of any
148144
// sequence of rapidly-fired blur/focus events
@@ -157,13 +153,10 @@ export class PausePlugin extends ButtonPlugin {
157153
this._focusTimer = setTimeout(
158154
function () {
159155
this._focusTimer = null;
160-
// A manual pause cannot be overriden by focus events.
161-
// User must click the resume button.
162-
if (this._isManualPause) {
163-
return;
164-
}
165156

166-
this.pause = Boolean(this._containerBlurred && this._appBlurred);
157+
if (this._appBlurred && this._containerBlurred) {
158+
this.pause = true;
159+
}
167160

168161
// Focus on the content window when blurring the app
169162
// but selecting the container

0 commit comments

Comments
 (0)