Skip to content

Commit

Permalink
set focus after click on the controls
Browse files Browse the repository at this point in the history
  • Loading branch information
rounce committed Feb 9, 2014
1 parent 19a32bf commit e1a78b0
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/js/mep-player.js
Original file line number Diff line number Diff line change
Expand Up @@ -1021,11 +1021,9 @@
return true;
});

// check if someone clicked outside a player region, then kill its focus
// check if someone clicked outside a player region, then kill its focus and vise versa
t.globalBind('click', function(event) {
if ($(event.target).closest('.mejs-container').length == 0) {
player.hasFocus = false;
}
player.hasFocus = $(event.target).closest('.mejs-container').length != 0;
});

},
Expand Down

0 comments on commit e1a78b0

Please sign in to comment.