Permalink
Browse files

tap on background now closes the modal (closes #2)

  • Loading branch information...
1 parent 39e5869 commit e63a0596e45d10f2ede9c3b880023aeef5343e80 @hakimel committed Oct 14, 2012
Showing with 2 additions and 0 deletions.
  1. +2 −0 js/avgrund.js
View
@@ -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' );
@@ -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')

1 comment on commit e63a059

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

Please sign in to comment.