Skip to content

Commit

Permalink
fix: use correct logic for menu focus (#4823)
Browse files Browse the repository at this point in the history
This was resulting in the menu not being focused for all browsers/devices (if the player was in a frame), but it should target only IOS.

Fixes #4821
  • Loading branch information
mfairchild365 authored and gkatsev committed Dec 14, 2017
1 parent 15cd32e commit 51ed400
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/js/menu/menu-button.js
Expand Up @@ -344,9 +344,12 @@ class MenuButton extends Component {

// set the focus into the submenu, except on iOS where it is resulting in
// undesired scrolling behavior when the player is in an iframe
if (!IS_IOS && !Dom.isInFrame()) {
this.menu.focus();
if (IS_IOS && Dom.isInFrame()) {
// Return early so that the menu isn't focused
return;
}

this.menu.focus();
}
}

Expand Down

0 comments on commit 51ed400

Please sign in to comment.