Permalink
Browse files

Improved method of detecting click outside of modal dialog

  • Loading branch information...
1 parent bcdaf97 commit e37d8c7fd1c6ee75d44fe3fb98cbc6d7307f47b3 @GarethElms committed Mar 15, 2012
Showing with 1 addition and 8 deletions.
  1. +1 −8 Backbone.ModalDialog.js
View
@@ -127,19 +127,12 @@ var ModalView =
click:
function( event)
{
- if( ! jQuery.contains( this.el, event.target) &&
- ! this.click_IsInside_JqueryUICalender( event))
+ if( event.target.id == "modal-blanket")
{
this.hideModal();
}
},
- click_IsInside_JqueryUICalender:
- function( event)
- {
- return ($(event.target).parentsUntil( "body", ".ui-datepicker").size() > 0);
- },
-
setFocusOnFirstFormControl:
function()
{

0 comments on commit e37d8c7

Please sign in to comment.