Skip to content

Commit

Permalink
Fixes issues with firefox and safari.
Browse files Browse the repository at this point in the history
  • Loading branch information
zorkow committed Feb 13, 2024
1 parent 89eddf6 commit d17d8f0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ts/a11y/explorer/KeyExplorer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,9 @@ export class SpeechExplorer extends AbstractExplorer<string> implements KeyExplo
* @override
*/
public FocusOut(_event: FocusEvent) {
// This guard is to FF and Safari, where focus in fires only once on
// keyboard.
if (!this.active) return;
this.generators.CleanUp(this.current);
if (!this.move) {
this.Stop();
Expand Down
6 changes: 6 additions & 0 deletions ts/a11y/explorer/Region.ts
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,12 @@ export class SpeechRegion extends LiveRegion {
setTimeout(() => {
if (this.voiceRequest) {
resolve(true);
} else {
// This case is to make FF and Safari work.
setTimeout(() => {
this.voiceRequest = true;
resolve(true);
}, 100);
}
}, 100);
});
Expand Down

0 comments on commit d17d8f0

Please sign in to comment.