Skip to content

Commit

Permalink
Added check that target.closest is a function in mousemov.vol code
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshStegmaier authored and digitas-git committed Jul 29, 2023
1 parent 677aeac commit 4d86d2b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/js/features/volume.js
Original file line number Diff line number Diff line change
Expand Up @@ -393,8 +393,9 @@ Object.assign(MediaElementPlayer.prototype, {
t.globalBind('mousemove.vol', (event) => {
const target = event.target;
if (mouseIsDown && (target === volumeSlider ||
(typeof target.closest == 'function' &&
target.closest((mode === 'vertical' ? `.${t.options.classPrefix}volume-slider` :
`.${t.options.classPrefix}horizontal-volume-slider`)))) {
`.${t.options.classPrefix}horizontal-volume-slider`))))) {
handleVolumeMove(event);
}
});
Expand Down

0 comments on commit 4d86d2b

Please sign in to comment.