Skip to content

Commit

Permalink
Merge pull request mediaelement#1094 from rounce/master
Browse files Browse the repository at this point in the history
restore focus after click on the controls
  • Loading branch information
johndyer committed Mar 27, 2014
2 parents 8254b22 + e1a78b0 commit e14d121
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 @@ -1026,11 +1026,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 e14d121

Please sign in to comment.