{"action":"opened","number":8051,"pull_request":{"url":"https://api.github.com/repos/jquery/jquery-mobile/pulls/8051","id":32168023,"html_url":"https://github.com/jquery/jquery-mobile/pull/8051","diff_url":"https://github.com/jquery/jquery-mobile/pull/8051.diff","patch_url":"https://github.com/jquery/jquery-mobile/pull/8051.patch","issue_url":"https://api.github.com/repos/jquery/jquery-mobile/issues/8051","number":8051,"state":"open","locked":false,"title":"Navigation: Do not trigger 'navigate' if popstate is default-prevented","user":{"login":"gabrielschulhof","id":976081,"avatar_url":"https://avatars.githubusercontent.com/u/976081?v=3","gravatar_id":"","url":"https://api.github.com/users/gabrielschulhof","html_url":"https://github.com/gabrielschulhof","followers_url":"https://api.github.com/users/gabrielschulhof/followers","following_url":"https://api.github.com/users/gabrielschulhof/following{/other_user}","gists_url":"https://api.github.com/users/gabrielschulhof/gists{/gist_id}","starred_url":"https://api.github.com/users/gabrielschulhof/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gabrielschulhof/subscriptions","organizations_url":"https://api.github.com/users/gabrielschulhof/orgs","repos_url":"https://api.github.com/users/gabrielschulhof/repos","events_url":"https://api.github.com/users/gabrielschulhof/events{/privacy}","received_events_url":"https://api.github.com/users/gabrielschulhof/received_events","type":"User","site_admin":false},"body":"Fixes gh-8045\r\n\r\nThe load order of navigation/navigator vs. events/navigate does not matter, because ```$.event.special.navigate``` attaches to hashchange/popstate only during ```setup()```, so someone must attach a navigate event handler first. This happens during the instantiation of the pagecontainer. That, in turn, is sufficiently late, since navigation/navigator attaches its popstate handler effectively from the outermost IIFE, because a ```$.mobile.Navigator``` object is instantiated from the outermost IIFE of navigation/method.\r\n\r\nTo test manually, load http://jsbin.com/vohozu/3/ from Safari. The page should load with the popup displayed.\r\n\r\nTo assert that a default-prevented popstate does not cause a navigate event, I had to introduce an early popstate handler that prevents default on the popstate event whenever a flag is set on the window object. This will be unnecessary once #8050 is fixed.","created_at":"2015-03-28T17:44:13Z","updated_at":"2015-03-28T17:44:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":{"login":"arschmitz","id":462993,"avatar_url":"https://avatars.githubusercontent.com/u/462993?v=3","gravatar_id":"","url":"https://api.github.com/users/arschmitz","html_url":"https://github.com/arschmitz","followers_url":"https://api.github.com/users/arschmitz/followers","following_url":"https://api.github.com/users/arschmitz/following{/other_user}","gists_url":"https://api.github.com/users/arschmitz/gists{/gist_id}","starred_url":"https://api.github.com/users/arschmitz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arschmitz/subscriptions","organizations_url":"https://api.github.com/users/arschmitz/orgs","repos_url":"https://api.github.com/users/arschmitz/repos","events_url":"https://api.github.com/users/arschmitz/events{/privacy}","received_events_url":"https://api.github.com/users/arschmitz/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/jquery/jquery-mobile/milestones/24","html_url":"https://github.com/jquery/jquery-mobile/milestones/1.5.0","labels_url":"https://api.github.com/repos/jquery/jquery-mobile/milestones/24/labels","id":265123,"number":24,"title":"1.5.0","description":"","creator":{"login":"jaspermdegroot","id":1296793,"avatar_url":"https://avatars.githubusercontent.com/u/1296793?v=3","gravatar_id":"","url":"https://api.github.com/users/jaspermdegroot","html_url":"https://github.com/jaspermdegroot","followers_url":"https://api.github.com/users/jaspermdegroot/followers","following_url":"https://api.github.com/users/jaspermdegroot/following{/other_user}","gists_url":"https://api.github.com/users/jaspermdegroot/gists{/gist_id}","starred_url":"https://api.github.com/users/jaspermdegroot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaspermdegroot/subscriptions","organizations_url":"https://api.github.com/users/jaspermdegroot/orgs","repos_url":"https://api.github.com/users/jaspermdegroot/repos","events_url":"https://api.github.com/users/jaspermdegroot/events{/privacy}","received_events_url":"https://api.github.com/users/jaspermdegroot/received_events","type":"User","site_admin":false},"open_issues":158,"closed_issues":116,"state":"open","created_at":"2013-02-12T09:05:39Z","updated_at":"2015-03-28T17:44:13Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/jquery/jquery-mobile/pulls/8051/commits","review_comments_url":"https://api.github.com/repos/jquery/jquery-mobile/pulls/8051/comments","review_comment_url":"https://api.github.com/repos/jquery/jquery-mobile/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jquery/jquery-mobile/issues/8051/comments","statuses_url":"https://api.github.com/repos/jquery/jquery-mobile/statuses/392c2361ee88e9bfe13923f6b5608c4824b4092f","head":{"label":"jquery:8045-handle-initial-popstate","ref":"8045-handle-initial-popstate","sha":"392c2361ee88e9bfe13923f6b5608c4824b4092f","user":{"login":"jquery","id":70142,"avatar_url":"https://avatars.githubusercontent.com/u/70142?v=3","gravatar_id":"","url":"https://api.github.com/users/jquery","html_url":"https://github.com/jquery","followers_url":"https://api.github.com/users/jquery/followers","following_url":"https://api.github.com/users/jquery/following{/other_user}","gists_url":"https://api.github.com/users/jquery/gists{/gist_id}","starred_url":"https://api.github.com/users/jquery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jquery/subscriptions","organizations_url":"https://api.github.com/users/jquery/orgs","repos_url":"https://api.github.com/users/jquery/repos","events_url":"https://api.github.com/users/jquery/events{/privacy}","received_events_url":"https://api.github.com/users/jquery/received_events","type":"Organization","site_admin":false},"repo":{"id":907410,"name":"jquery-mobile","full_name":"jquery/jquery-mobile","owner":{"login":"jquery","id":70142,"avatar_url":"https://avatars.githubusercontent.com/u/70142?v=3","gravatar_id":"","url":"https://api.github.com/users/jquery","html_url":"https://github.com/jquery","followers_url":"https://api.github.com/users/jquery/followers","following_url":"https://api.github.com/users/jquery/following{/other_user}","gists_url":"https://api.github.com/users/jquery/gists{/gist_id}","starred_url":"https://api.github.com/users/jquery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jquery/subscriptions","organizations_url":"https://api.github.com/users/jquery/orgs","repos_url":"https://api.github.com/users/jquery/repos","events_url":"https://api.github.com/users/jquery/events{/privacy}","received_events_url":"https://api.github.com/users/jquery/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/jquery/jquery-mobile","description":"jQuery Mobile Framework","fork":false,"url":"https://api.github.com/repos/jquery/jquery-mobile","forks_url":"https://api.github.com/repos/jquery/jquery-mobile/forks","keys_url":"https://api.github.com/repos/jquery/jquery-mobile/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jquery/jquery-mobile/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jquery/jquery-mobile/teams","hooks_url":"https://api.github.com/repos/jquery/jquery-mobile/hooks","issue_events_url":"https://api.github.com/repos/jquery/jquery-mobile/issues/events{/number}","events_url":"https://api.github.com/repos/jquery/jquery-mobile/events","assignees_url":"https://api.github.com/repos/jquery/jquery-mobile/assignees{/user}","branches_url":"https://api.github.com/repos/jquery/jquery-mobile/branches{/branch}","tags_url":"https://api.github.com/repos/jquery/jquery-mobile/tags","blobs_url":"https://api.github.com/repos/jquery/jquery-mobile/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jquery/jquery-mobile/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jquery/jquery-mobile/git/refs{/sha}","trees_url":"https://api.github.com/repos/jquery/jquery-mobile/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jquery/jquery-mobile/statuses/{sha}","languages_url":"https://api.github.com/repos/jquery/jquery-mobile/languages","stargazers_url":"https://api.github.com/repos/jquery/jquery-mobile/stargazers","contributors_url":"https://api.github.com/repos/jquery/jquery-mobile/contributors","subscribers_url":"https://api.github.com/repos/jquery/jquery-mobile/subscribers","subscription_url":"https://api.github.com/repos/jquery/jquery-mobile/subscription","commits_url":"https://api.github.com/repos/jquery/jquery-mobile/commits{/sha}","git_commits_url":"https://api.github.com/repos/jquery/jquery-mobile/git/commits{/sha}","comments_url":"https://api.github.com/repos/jquery/jquery-mobile/comments{/number}","issue_comment_url":"https://api.github.com/repos/jquery/jquery-mobile/issues/comments{/number}","contents_url":"https://api.github.com/repos/jquery/jquery-mobile/contents/{+path}","compare_url":"https://api.github.com/repos/jquery/jquery-mobile/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jquery/jquery-mobile/merges","archive_url":"https://api.github.com/repos/jquery/jquery-mobile/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jquery/jquery-mobile/downloads","issues_url":"https://api.github.com/repos/jquery/jquery-mobile/issues{/number}","pulls_url":"https://api.github.com/repos/jquery/jquery-mobile/pulls{/number}","milestones_url":"https://api.github.com/repos/jquery/jquery-mobile/milestones{/number}","notifications_url":"https://api.github.com/repos/jquery/jquery-mobile/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jquery/jquery-mobile/labels{/name}","releases_url":"https://api.github.com/repos/jquery/jquery-mobile/releases{/id}","created_at":"2010-09-13T15:02:22Z","updated_at":"2015-03-27T16:32:49Z","pushed_at":"2015-03-28T17:34:39Z","git_url":"git://github.com/jquery/jquery-mobile.git","ssh_url":"git@github.com:jquery/jquery-mobile.git","clone_url":"https://github.com/jquery/jquery-mobile.git","svn_url":"https://github.com/jquery/jquery-mobile","homepage":"http://jquerymobile.com/","size":181661,"stargazers_count":9462,"watchers_count":9462,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2515,"mirror_url":null,"open_issues_count":353,"forks":2515,"open_issues":353,"watchers":9462,"default_branch":"master"}},"base":{"label":"jquery:master","ref":"master","sha":"1d10a22092b36edcf60f758d1bc11c86391c8a0b","user":{"login":"jquery","id":70142,"avatar_url":"https://avatars.githubusercontent.com/u/70142?v=3","gravatar_id":"","url":"https://api.github.com/users/jquery","html_url":"https://github.com/jquery","followers_url":"https://api.github.com/users/jquery/followers","following_url":"https://api.github.com/users/jquery/following{/other_user}","gists_url":"https://api.github.com/users/jquery/gists{/gist_id}","starred_url":"https://api.github.com/users/jquery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jquery/subscriptions","organizations_url":"https://api.github.com/users/jquery/orgs","repos_url":"https://api.github.com/users/jquery/repos","events_url":"https://api.github.com/users/jquery/events{/privacy}","received_events_url":"https://api.github.com/users/jquery/received_events","type":"Organization","site_admin":false},"repo":{"id":907410,"name":"jquery-mobile","full_name":"jquery/jquery-mobile","owner":{"login":"jquery","id":70142,"avatar_url":"https://avatars.githubusercontent.com/u/70142?v=3","gravatar_id":"","url":"https://api.github.com/users/jquery","html_url":"https://github.com/jquery","followers_url":"https://api.github.com/users/jquery/followers","following_url":"https://api.github.com/users/jquery/following{/other_user}","gists_url":"https://api.github.com/users/jquery/gists{/gist_id}","starred_url":"https://api.github.com/users/jquery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jquery/subscriptions","organizations_url":"https://api.github.com/users/jquery/orgs","repos_url":"https://api.github.com/users/jquery/repos","events_url":"https://api.github.com/users/jquery/events{/privacy}","received_events_url":"https://api.github.com/users/jquery/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/jquery/jquery-mobile","description":"jQuery Mobile Framework","fork":false,"url":"https://api.github.com/repos/jquery/jquery-mobile","forks_url":"https://api.github.com/repos/jquery/jquery-mobile/forks","keys_url":"https://api.github.com/repos/jquery/jquery-mobile/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jquery/jquery-mobile/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jquery/jquery-mobile/teams","hooks_url":"https://api.github.com/repos/jquery/jquery-mobile/hooks","issue_events_url":"https://api.github.com/repos/jquery/jquery-mobile/issues/events{/number}","events_url":"https://api.github.com/repos/jquery/jquery-mobile/events","assignees_url":"https://api.github.com/repos/jquery/jquery-mobile/assignees{/user}","branches_url":"https://api.github.com/repos/jquery/jquery-mobile/branches{/branch}","tags_url":"https://api.github.com/repos/jquery/jquery-mobile/tags","blobs_url":"https://api.github.com/repos/jquery/jquery-mobile/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jquery/jquery-mobile/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jquery/jquery-mobile/git/refs{/sha}","trees_url":"https://api.github.com/repos/jquery/jquery-mobile/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jquery/jquery-mobile/statuses/{sha}","languages_url":"https://api.github.com/repos/jquery/jquery-mobile/languages","stargazers_url":"https://api.github.com/repos/jquery/jquery-mobile/stargazers","contributors_url":"https://api.github.com/repos/jquery/jquery-mobile/contributors","subscribers_url":"https://api.github.com/repos/jquery/jquery-mobile/subscribers","subscription_url":"https://api.github.com/repos/jquery/jquery-mobile/subscription","commits_url":"https://api.github.com/repos/jquery/jquery-mobile/commits{/sha}","git_commits_url":"https://api.github.com/repos/jquery/jquery-mobile/git/commits{/sha}","comments_url":"https://api.github.com/repos/jquery/jquery-mobile/comments{/number}","issue_comment_url":"https://api.github.com/repos/jquery/jquery-mobile/issues/comments{/number}","contents_url":"https://api.github.com/repos/jquery/jquery-mobile/contents/{+path}","compare_url":"https://api.github.com/repos/jquery/jquery-mobile/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jquery/jquery-mobile/merges","archive_url":"https://api.github.com/repos/jquery/jquery-mobile/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jquery/jquery-mobile/downloads","issues_url":"https://api.github.com/repos/jquery/jquery-mobile/issues{/number}","pulls_url":"https://api.github.com/repos/jquery/jquery-mobile/pulls{/number}","milestones_url":"https://api.github.com/repos/jquery/jquery-mobile/milestones{/number}","notifications_url":"https://api.github.com/repos/jquery/jquery-mobile/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jquery/jquery-mobile/labels{/name}","releases_url":"https://api.github.com/repos/jquery/jquery-mobile/releases{/id}","created_at":"2010-09-13T15:02:22Z","updated_at":"2015-03-27T16:32:49Z","pushed_at":"2015-03-28T17:34:39Z","git_url":"git://github.com/jquery/jquery-mobile.git","ssh_url":"git@github.com:jquery/jquery-mobile.git","clone_url":"https://github.com/jquery/jquery-mobile.git","svn_url":"https://github.com/jquery/jquery-mobile","homepage":"http://jquerymobile.com/","size":181661,"stargazers_count":9462,"watchers_count":9462,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2515,"mirror_url":null,"open_issues_count":353,"forks":2515,"open_issues":353,"watchers":9462,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jquery/jquery-mobile/pulls/8051"},"html":{"href":"https://github.com/jquery/jquery-mobile/pull/8051"},"issue":{"href":"https://api.github.com/repos/jquery/jquery-mobile/issues/8051"},"comments":{"href":"https://api.github.com/repos/jquery/jquery-mobile/issues/8051/comments"},"review_comments":{"href":"https://api.github.com/repos/jquery/jquery-mobile/pulls/8051/comments"},"review_comment":{"href":"https://api.github.com/repos/jquery/jquery-mobile/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jquery/jquery-mobile/pulls/8051/commits"},"statuses":{"href":"https://api.github.com/repos/jquery/jquery-mobile/statuses/392c2361ee88e9bfe13923f6b5608c4824b4092f"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":3,"additions":60,"deletions":5,"changed_files":4}}