Skip to content

Commit

Permalink
Contribution: Fix for issue #111 - Update to modaal.js file to be res…
Browse files Browse the repository at this point in the history
…ponsive to certain clicks outside videos

Update so that if overlay_close is true and a user clicks outside the video on .modaal-video-wrap the modal will close.
  • Loading branch information
johngeesey authored and danhumaan committed Nov 6, 2018
1 parent 3d3abd6 commit 2934c2b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dist/js/modaal.js
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@

// General Controls: If it's not locked allow greedy close
if ( !self.options.is_locked ){
if ( (self.options.overlay_close && trigger.is('.modaal-inner-wrapper')) || trigger.is('.modaal-close') || trigger.closest('.modaal-close').length ) {
if ((self.options.overlay_close && (trigger.is('.modaal-inner-wrapper') || (self.options.type == 'video' && trigger.is('.modaal-video-wrap')))) || trigger.is('.modaal-close') || trigger.closest('.modaal-close').length ) {
self.modaal_close();
return;
}
Expand Down

0 comments on commit 2934c2b

Please sign in to comment.