{"action":"created","issue":{"url":"https://api.github.com/repos/processing/p5.js/issues/996","labels_url":"https://api.github.com/repos/processing/p5.js/issues/996/labels{/name}","comments_url":"https://api.github.com/repos/processing/p5.js/issues/996/comments","events_url":"https://api.github.com/repos/processing/p5.js/issues/996/events","html_url":"https://github.com/processing/p5.js/issues/996","id":110893192,"number":996,"title":"mouseIsPressed is not understood correctly by chrome","user":{"login":"swirly","id":2655257,"avatar_url":"https://avatars.githubusercontent.com/u/2655257?v=3","gravatar_id":"","url":"https://api.github.com/users/swirly","html_url":"https://github.com/swirly","followers_url":"https://api.github.com/users/swirly/followers","following_url":"https://api.github.com/users/swirly/following{/other_user}","gists_url":"https://api.github.com/users/swirly/gists{/gist_id}","starred_url":"https://api.github.com/users/swirly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/swirly/subscriptions","organizations_url":"https://api.github.com/users/swirly/orgs","repos_url":"https://api.github.com/users/swirly/repos","events_url":"https://api.github.com/users/swirly/events{/privacy}","received_events_url":"https://api.github.com/users/swirly/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-10-12T00:22:40Z","updated_at":"2015-10-12T04:51:47Z","closed_at":"2015-10-12T00:47:25Z","body":"Try the two versions of the same code for example \r\n-------------------\r\nfunction mousePressed() {\r\n        if (mouseButton == LEFT ) {\r\n            ellipse(mouseX,mouseY,random(40,150),80);\r\n        }\r\n        if (mouseButton == RIGHT ) {\r\n            background(random(180,255),random(180,255),random(180,255));\r\n        }\r\n}\r\n--------------------\r\nworks as intended in chrome and firefox\r\nbut\r\n--------------------\r\nfunction draw() {\r\n    // Cette fonction sera utilisée pour dessiner sur l'espace de dessin\r\n    if (mouseIsPressed) {\r\n        if (mouseButton == LEFT ) {\r\n            ellipse(mouseX,mouseY,random(40,150),80);\r\n        }\r\n        if (mouseButton == RIGHT ) {\r\n            background(random(180,255),random(180,255),random(180,255));\r\n        }\r\n    }    \r\n}\r\n----------\r\nworks as intended in firefox but not at all in chrome. In chrome, mouseIsPressed stay true for a while on left mouse button, and stay as long as you don't reclick for right button !!!!\r\n\r\nMaybe it's a chrome specific javascript problem. But because I use brackets for the previews with my pupils, it's annoying."},"comment":{"url":"https://api.github.com/repos/processing/p5.js/issues/comments/147291473","html_url":"https://github.com/processing/p5.js/issues/996#issuecomment-147291473","issue_url":"https://api.github.com/repos/processing/p5.js/issues/996","id":147291473,"user":{"login":"swirly","id":2655257,"avatar_url":"https://avatars.githubusercontent.com/u/2655257?v=3","gravatar_id":"","url":"https://api.github.com/users/swirly","html_url":"https://github.com/swirly","followers_url":"https://api.github.com/users/swirly/followers","following_url":"https://api.github.com/users/swirly/following{/other_user}","gists_url":"https://api.github.com/users/swirly/gists{/gist_id}","starred_url":"https://api.github.com/users/swirly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/swirly/subscriptions","organizations_url":"https://api.github.com/users/swirly/orgs","repos_url":"https://api.github.com/users/swirly/repos","events_url":"https://api.github.com/users/swirly/events{/privacy}","received_events_url":"https://api.github.com/users/swirly/received_events","type":"User","site_admin":false},"created_at":"2015-10-12T04:51:47Z","updated_at":"2015-10-12T04:51:47Z","body":"Agreed. But for the right click, it stays to true as long as you don't click once more, wich is not a fps problem.\r\n\r\nThis really should be treated as a bug."}}