{"action":"created","issue":{"url":"https://api.github.com/repos/ilmente/mnTouch/issues/13","repository_url":"https://api.github.com/repos/ilmente/mnTouch","labels_url":"https://api.github.com/repos/ilmente/mnTouch/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/ilmente/mnTouch/issues/13/comments","events_url":"https://api.github.com/repos/ilmente/mnTouch/issues/13/events","html_url":"https://github.com/ilmente/mnTouch/issues/13","id":159119997,"number":13,"title":"hold functions are not working properly on mixed events","user":{"login":"feyyazakkus","id":12934020,"avatar_url":"https://avatars.githubusercontent.com/u/12934020?v=3","gravatar_id":"","url":"https://api.github.com/users/feyyazakkus","html_url":"https://github.com/feyyazakkus","followers_url":"https://api.github.com/users/feyyazakkus/followers","following_url":"https://api.github.com/users/feyyazakkus/following{/other_user}","gists_url":"https://api.github.com/users/feyyazakkus/gists{/gist_id}","starred_url":"https://api.github.com/users/feyyazakkus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/feyyazakkus/subscriptions","organizations_url":"https://api.github.com/users/feyyazakkus/orgs","repos_url":"https://api.github.com/users/feyyazakkus/repos","events_url":"https://api.github.com/users/feyyazakkus/events{/privacy}","received_events_url":"https://api.github.com/users/feyyazakkus/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-06-08T09:35:18Z","updated_at":"2016-06-09T08:48:31Z","closed_at":null,"body":"I have a directive which creates buttons for scroll up and down events. I used this directive plugin in my own directive's templates. When i mixed hold and secure-tap events sometimes hold functions are not working. I really dont know why. But secure-tab functions always working.\r\n\r\nAnd if i use only tab events its also working as its supposed to be. \r\n\r\nI am testing this in chrome with some mobile window extention.\r\n\r\nHere is my directive:\r\n```\r\n  app.directive('scrollUpDown', function () {\r\n\r\n      var scrolled = 0, docHeight;\r\n\r\n      return {\r\n        restrict: 'EA',\r\n        template: '<div class=\"scroll-up-down-buttons\" ng-show=\"display\">' +\r\n            '<p><span mn-touch secure-tap=\"tapUp()\" threshold=\"30\" hold=\"holdUp()\" holdfor=\"600\" class=\"glyphicon glyphicon-circle-arrow-up\"></span></p>' +\r\n            '<p><span mn-touch secure-tap=\"tapDown()\" threshold=\"30\" hold=\"holdDown()\" holdfor=\"600\" class=\"glyphicon glyphicon-circle-arrow-down\"></span></p>' +\r\n        '</div>',\r\n        \r\n        link: function (scope, element, attrs) {\r\n\r\n          // if mobile device\r\n          scope.display = ($(window).width() <= 768) ? true : false;\r\n\r\n          if (scope.display) {\r\n            $(window).scroll(function () {\r\n              scrolled = $(this).scrollTop();\r\n            });\r\n          }\r\n          docHeight = $(document).height();\r\n        },\r\n\r\n        controller: function ($scope) {\r\n          \r\n          $scope.tapUp = function () {\r\n            console.log(\"tapUp\");\r\n            scrolled = scrolled - 150;\r\n            $('body').animate({ scrollTop: scrolled });\r\n          };\r\n\r\n          $scope.tapDown = function () {\r\n            console.log(\"tapDown\");\r\n            scrolled = scrolled + 150;\r\n            $('body').animate({ scrollTop: scrolled });\r\n          };\r\n\r\n          $scope.holdUp = function () {\r\n            console.log(\"holdUp\");\r\n            //console.log($event.name + ': %o', $event);\r\n            $('body').animate({ scrollTop: 0 });\r\n          };\r\n\r\n          $scope.holdDown = function () {\r\n            console.log(\"holdDown\");\r\n            $('body').animate({ scrollTop: docHeight });\r\n          };\r\n        }\r\n      }\r\n  }); // directive end\r\n```\r\nHope you can help thanks. "},"comment":{"url":"https://api.github.com/repos/ilmente/mnTouch/issues/comments/224835939","html_url":"https://github.com/ilmente/mnTouch/issues/13#issuecomment-224835939","issue_url":"https://api.github.com/repos/ilmente/mnTouch/issues/13","id":224835939,"user":{"login":"abelspry","id":13625733,"avatar_url":"https://avatars.githubusercontent.com/u/13625733?v=3","gravatar_id":"","url":"https://api.github.com/users/abelspry","html_url":"https://github.com/abelspry","followers_url":"https://api.github.com/users/abelspry/followers","following_url":"https://api.github.com/users/abelspry/following{/other_user}","gists_url":"https://api.github.com/users/abelspry/gists{/gist_id}","starred_url":"https://api.github.com/users/abelspry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abelspry/subscriptions","organizations_url":"https://api.github.com/users/abelspry/orgs","repos_url":"https://api.github.com/users/abelspry/repos","events_url":"https://api.github.com/users/abelspry/events{/privacy}","received_events_url":"https://api.github.com/users/abelspry/received_events","type":"User","site_admin":false},"created_at":"2016-06-09T08:48:31Z","updated_at":"2016-06-09T08:48:31Z","body":"Hi @feyyazakkus,\r\nthanks for reporting.\r\n\r\nI'll check it out asap!\r\nThanks.\r\n\r\n"}}
{"actor":{"display_login":"abelspry"}}