diff options
author | Sam Potts <me@sampotts.me> | 2016-01-14 01:19:48 +1100 |
---|---|---|
committer | Sam Potts <me@sampotts.me> | 2016-01-14 01:19:48 +1100 |
commit | e05538e480b7313ed6b3e9bbbada62e91203b9c0 (patch) | |
tree | 2e9f2ce60684233e6080db8f72db9f9a817e7832 /src/js/plyr.js | |
parent | 38f554b480de7de4cb1f2afa82f024085014a071 (diff) | |
download | plyr-e05538e480b7313ed6b3e9bbbada62e91203b9c0.tar.lz plyr-e05538e480b7313ed6b3e9bbbada62e91203b9c0.tar.xz plyr-e05538e480b7313ed6b3e9bbbada62e91203b9c0.zip |
Tab focus
Diffstat (limited to 'src/js/plyr.js')
-rw-r--r-- | src/js/plyr.js | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/js/plyr.js b/src/js/plyr.js index af4f17be..b3e9cfdf 100644 --- a/src/js/plyr.js +++ b/src/js/plyr.js @@ -2130,7 +2130,16 @@ checkFocus(); } }); - _on(document.body, 'click', checkFocus); + _on(document.body, 'click', function() { + _toggleClass(_getElement('.' + config.classes.tabFocus), config.classes.tabFocus, false); + }); + for (var button in plyr.buttons) { + var element = plyr.buttons[button]; + + _on(element, 'blur', function() { + _toggleClass(element, 'tab-focus', false); + }); + } // Play _on(plyr.buttons.play, 'click', function() { _togglePlay(true); }); |