Skip to content

Commit d17d8f0

Browse files
committed
Fixes issues with firefox and safari.
1 parent 89eddf6 commit d17d8f0

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

ts/a11y/explorer/KeyExplorer.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,9 @@ export class SpeechExplorer extends AbstractExplorer<string> implements KeyExplo
204204
* @override
205205
*/
206206
public FocusOut(_event: FocusEvent) {
207+
// This guard is to FF and Safari, where focus in fires only once on
208+
// keyboard.
209+
if (!this.active) return;
207210
this.generators.CleanUp(this.current);
208211
if (!this.move) {
209212
this.Stop();

ts/a11y/explorer/Region.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -417,6 +417,12 @@ export class SpeechRegion extends LiveRegion {
417417
setTimeout(() => {
418418
if (this.voiceRequest) {
419419
resolve(true);
420+
} else {
421+
// This case is to make FF and Safari work.
422+
setTimeout(() => {
423+
this.voiceRequest = true;
424+
resolve(true);
425+
}, 100);
420426
}
421427
}, 100);
422428
});

0 commit comments

Comments
 (0)