From e3db08563b445e92854b9e2d57e3b76671b1e731 Mon Sep 17 00:00:00 2001 From: Andrew Date: Mon, 7 Jul 2014 12:42:01 -0600 Subject: [PATCH] fix(sideMenu): when drag-content=false, allow drag-to-close Closes #1419 --- js/angular/controller/sideMenuController.js | 2 +- test/html/sideMenu.html | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/js/angular/controller/sideMenuController.js b/js/angular/controller/sideMenuController.js index 160266a7d1e..e02d1a905e8 100644 --- a/js/angular/controller/sideMenuController.js +++ b/js/angular/controller/sideMenuController.js @@ -38,7 +38,7 @@ function($scope, $attrs, $ionicSideMenuDelegate, $ionicPlatform) { }; this.isDraggableTarget = function(e) { - return $scope.dragContent && + return (self.isOpen() || $scope.dragContent) && (!e.gesture.srcEvent.defaultPrevented && !e.target.tagName.match(/input|textarea|select|object|embed/i) && !e.target.isContentEditable && diff --git a/test/html/sideMenu.html b/test/html/sideMenu.html index e02c99a61bc..b9983de1047 100644 --- a/test/html/sideMenu.html +++ b/test/html/sideMenu.html @@ -13,14 +13,14 @@ - +

Slide me

- Hello + Disable Drag Content?

Content