{"action":"closed","issue":{"url":"https://api.github.com/repos/KTXSoftware/Kha/issues/374","repository_url":"https://api.github.com/repos/KTXSoftware/Kha","labels_url":"https://api.github.com/repos/KTXSoftware/Kha/issues/374/labels{/name}","comments_url":"https://api.github.com/repos/KTXSoftware/Kha/issues/374/comments","events_url":"https://api.github.com/repos/KTXSoftware/Kha/issues/374/events","html_url":"https://github.com/KTXSoftware/Kha/issues/374","id":170902694,"number":374,"title":"Mouse.get().notify firing twice for Chrome on Android.","user":{"login":"caiopsouza","id":1131681,"avatar_url":"https://avatars.githubusercontent.com/u/1131681?v=3","gravatar_id":"","url":"https://api.github.com/users/caiopsouza","html_url":"https://github.com/caiopsouza","followers_url":"https://api.github.com/users/caiopsouza/followers","following_url":"https://api.github.com/users/caiopsouza/following{/other_user}","gists_url":"https://api.github.com/users/caiopsouza/gists{/gist_id}","starred_url":"https://api.github.com/users/caiopsouza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caiopsouza/subscriptions","organizations_url":"https://api.github.com/users/caiopsouza/orgs","repos_url":"https://api.github.com/users/caiopsouza/repos","events_url":"https://api.github.com/users/caiopsouza/events{/privacy}","received_events_url":"https://api.github.com/users/caiopsouza/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-08-12T15:53:59Z","updated_at":"2016-11-11T01:14:23Z","closed_at":"2016-11-11T01:14:23Z","body":"You can use this code to replicate\n\n``` haxe\n\npackage;\n\nimport kha.Assets;\nimport kha.Framebuffer;\nimport kha.Scheduler;\nimport kha.System;\n\nclass Project {\n    public function new() {\n        Assets.loadEverything(function()\n        {\n            System.notifyOnRender(render);\n            Scheduler.addTimeTask(update, 0, 1 / 60);\n\n            kha.input.Mouse.get().notify\n                (function(_, _, _) trace(\"Mouse pressed\"), null, null, null);\n        });\n    }\n\n    function update(): Void {\n\n    }\n\n    function render(framebuffer: Framebuffer): Void {\n        framebuffer.g2.begin();\n        framebuffer.g2.end();\n    }\n}\n\n```\n\nIt'll print \"Mouse pressed\" twice for each click.\n\nYou can replicate on desktop by selecting \"Toggle device toolbar\" on the \"Developer Tools\".\n\nWhat is happening is that both [mouseDown](https://github.com/KTXSoftware/Kha/blob/master/Backends/HTML5/kha/SystemImpl.hx#L503) and [touchDown](https://github.com/KTXSoftware/Kha/blob/master/Backends/HTML5/kha/SystemImpl.hx#L597) are firing on the same input.\n"}}
{"actor":{"display_login":"RobDangerous"}}