mirror of
https://github.com/zotero/zotero.git
synced 2026-08-28 05:25:31 +00:00
Read Aloud: Handle failure when trying to pause other tab
Some checks are pending
CI / Build, Upload, Test (push) Waiting to run
Some checks are pending
CI / Build, Upload, Test (push) Waiting to run
https://forums.zotero.org/discussion/130920/tts-breaks-after-automatic-theme-changes
This commit is contained in:
parent
d2d4451165
commit
488fd29978
1 changed files with 10 additions and 1 deletions
|
|
@ -1963,7 +1963,16 @@ class ReaderTab extends ReaderInstance {
|
|||
// If this tab was unpaused, pause all others
|
||||
for (let reader of Zotero.Reader._readers) {
|
||||
if (reader === this) continue;
|
||||
reader.toggleReadAloudPaused(true);
|
||||
try {
|
||||
reader.toggleReadAloudPaused(true);
|
||||
}
|
||||
catch (e) {
|
||||
// Failed to pause the other reader.
|
||||
// This seems to be caused by the _internalReader being a
|
||||
// dead object. Not clear why, but we can log and continue;
|
||||
// if the other reader is dead, it's not playing audio.
|
||||
Zotero.logError(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
this._window.Zotero_Tabs.setAudioStatus(this.tabID, status);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue