diff options
author | Sam Potts <sam@potts.es> | 2018-08-01 01:38:57 +1000 |
---|---|---|
committer | Sam Potts <sam@potts.es> | 2018-08-01 01:38:57 +1000 |
commit | aaa56caa9cfea98fef06767e8c1bedd85fbf4199 (patch) | |
tree | f332e241a7a326c6013ce82a8762292b170c4ff2 /dist/plyr.js | |
parent | c8db1e55ddff51a1eb4ff08887cbed134116cd88 (diff) | |
download | plyr-aaa56caa9cfea98fef06767e8c1bedd85fbf4199.tar.lz plyr-aaa56caa9cfea98fef06767e8c1bedd85fbf4199.tar.xz plyr-aaa56caa9cfea98fef06767e8c1bedd85fbf4199.zip |
Only focus button if menu wasn’t hidden already
Diffstat (limited to 'dist/plyr.js')
-rw-r--r-- | dist/plyr.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/dist/plyr.js b/dist/plyr.js index 1f3e49f4..c838ddb6 100644 --- a/dist/plyr.js +++ b/dist/plyr.js @@ -2427,7 +2427,8 @@ typeof navigator === "object" && (function (global, factory) { } // True toggle by default - var show = is.element(popup) && popup.hasAttribute('hidden'); + var hidden = popup.hasAttribute('hidden'); + var show = hidden; if (is.boolean(input)) { show = input; @@ -2468,7 +2469,7 @@ typeof navigator === "object" && (function (global, factory) { setFocus.call(this, firstItem, true); } // If closing, re-focus the button - else if (!show) { + else if (!show && !hidden) { setFocus.call(this, button, is.keyboardEvent(input)); } }, |