Skip to content

Commit

Permalink
tap on background now closes the modal (closes #2)
Browse files Browse the repository at this point in the history
  • Loading branch information
hakimel committed Oct 14, 2012
1 parent 39e5869 commit e63a059
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions js/avgrund.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ var Avgrund = (function(){
function activate( state ) {
document.addEventListener( 'keyup', onDocumentKeyUp, false );
document.addEventListener( 'click', onDocumentClick, false );
document.addEventListener( 'touchstart', onDocumentClick, false );

removeClass( popup, currentState );
addClass( popup, 'no-transition' );
Expand All @@ -47,6 +48,7 @@ var Avgrund = (function(){
function deactivate() {
document.removeEventListener( 'keyup', onDocumentKeyUp, false );
document.removeEventListener( 'click', onDocumentClick, false );
document.removeEventListener( 'touchstart', onDocumentClick, false );

removeClass( container, 'avgrund-active' );
removeClass( popup, 'avgrund-popup-animate')
Expand Down

1 comment on commit e63a059

@hamburger123456
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Hakim,
nice work.
What is this for?
addClass( popup, state );
state is always undefinded ...

Please sign in to comment.