{"action":"created","issue":{"url":"https://api.github.com/repos/visionmedia/page.js/issues/519","repository_url":"https://api.github.com/repos/visionmedia/page.js","labels_url":"https://api.github.com/repos/visionmedia/page.js/issues/519/labels{/name}","comments_url":"https://api.github.com/repos/visionmedia/page.js/issues/519/comments","events_url":"https://api.github.com/repos/visionmedia/page.js/issues/519/events","html_url":"https://github.com/visionmedia/page.js/pull/519","id":375974673,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI3Mjk1MzMx","number":519,"title":"Prevent duplicate event handler registration by configuring the router only once","user":{"login":"jsnajdr","id":664258,"node_id":"MDQ6VXNlcjY2NDI1OA==","avatar_url":"https://avatars3.githubusercontent.com/u/664258?v=4","gravatar_id":"","url":"https://api.github.com/users/jsnajdr","html_url":"https://github.com/jsnajdr","followers_url":"https://api.github.com/users/jsnajdr/followers","following_url":"https://api.github.com/users/jsnajdr/following{/other_user}","gists_url":"https://api.github.com/users/jsnajdr/gists{/gist_id}","starred_url":"https://api.github.com/users/jsnajdr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsnajdr/subscriptions","organizations_url":"https://api.github.com/users/jsnajdr/orgs","repos_url":"https://api.github.com/users/jsnajdr/repos","events_url":"https://api.github.com/users/jsnajdr/events{/privacy}","received_events_url":"https://api.github.com/users/jsnajdr/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2018-10-31T13:56:09Z","updated_at":"2018-11-01T09:58:11Z","closed_at":"2018-10-31T22:31:24Z","author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/visionmedia/page.js/pulls/519","html_url":"https://github.com/visionmedia/page.js/pull/519","diff_url":"https://github.com/visionmedia/page.js/pull/519.diff","patch_url":"https://github.com/visionmedia/page.js/pull/519.patch"},"body":"Remove the `options` parameter from `page.create`/`createPage` (it wasn't used anyway) and also from the `Page` constructor together with the `configure` call there.\r\n\r\nThat ensures that the router is configured only once, with the user-supplied `options`, instead of being configured twice: first with default `options` in constructor, second time with user-supplied `options` in `page.start`.\r\n\r\nFixes a real-world issue where passing `{ click: false }` to `page.start` didn't prevent adding the global click handler to the document anyway, because the default value of the `click` option is `true`.\r\n\r\n**How I tested this:**\r\nUnit tests still pass both in Node and in browser.\r\n\r\nI also tested the router in WordPress.com Calypso and it works as expected. The issues described in \r\n- https://github.com/visionmedia/page.js/pull/509#issuecomment-433972197\r\n- https://github.com/Automattic/wp-calypso/pull/28071#issuecomment-433019802\r\n- https://github.com/Automattic/wp-calypso/pull/26944\r\n\r\nare no longer present and everything works as expected again 👌 \r\n\r\nBased on earlier PR by @kaisermann (#509)\r\nFixes #508 "},"comment":{"url":"https://api.github.com/repos/visionmedia/page.js/issues/comments/434990986","html_url":"https://github.com/visionmedia/page.js/pull/519#issuecomment-434990986","issue_url":"https://api.github.com/repos/visionmedia/page.js/issues/519","id":434990986,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNDk5MDk4Ng==","user":{"login":"andyburke","id":273857,"node_id":"MDQ6VXNlcjI3Mzg1Nw==","avatar_url":"https://avatars0.githubusercontent.com/u/273857?v=4","gravatar_id":"","url":"https://api.github.com/users/andyburke","html_url":"https://github.com/andyburke","followers_url":"https://api.github.com/users/andyburke/followers","following_url":"https://api.github.com/users/andyburke/following{/other_user}","gists_url":"https://api.github.com/users/andyburke/gists{/gist_id}","starred_url":"https://api.github.com/users/andyburke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andyburke/subscriptions","organizations_url":"https://api.github.com/users/andyburke/orgs","repos_url":"https://api.github.com/users/andyburke/repos","events_url":"https://api.github.com/users/andyburke/events{/privacy}","received_events_url":"https://api.github.com/users/andyburke/received_events","type":"User","site_admin":false},"created_at":"2018-11-01T09:58:11Z","updated_at":"2018-11-01T09:58:11Z","author_association":"CONTRIBUTOR","body":"Actually, now I am struggling with this... I'm doing a page.start( { dispatch: false } ), but then calling page.show( url ) and it is not dispatching, I think due to this change:\r\n\r\nhttps://github.com/visionmedia/page.js/commit/2447b2313887c95ab2aeea56433192677b174a3a#diff-50e3e6872ec225cd4caa566f1f15e89cR603\r\n\r\nWhy is the 'dispatch' argument to page.show() ignored in preference to page instance's _dispatch?(which I think should indicate *initial* dispatch, not all dispatching, right?)"}}
{"actor":{"display_login":"andyburke"}}