{"action":"opened","number":2118,"pull_request":{"url":"https://api.github.com/repos/philc/vimium/pulls/2118","id":68221876,"html_url":"https://github.com/philc/vimium/pull/2118","diff_url":"https://github.com/philc/vimium/pull/2118.diff","patch_url":"https://github.com/philc/vimium/pull/2118.patch","issue_url":"https://api.github.com/repos/philc/vimium/issues/2118","number":2118,"state":"open","locked":false,"title":"Fix UI-component initialization issues (maybe).","user":{"login":"smblott-github","id":2641335,"avatar_url":"https://avatars.githubusercontent.com/u/2641335?v=3","gravatar_id":"","url":"https://api.github.com/users/smblott-github","html_url":"https://github.com/smblott-github","followers_url":"https://api.github.com/users/smblott-github/followers","following_url":"https://api.github.com/users/smblott-github/following{/other_user}","gists_url":"https://api.github.com/users/smblott-github/gists{/gist_id}","starred_url":"https://api.github.com/users/smblott-github/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smblott-github/subscriptions","organizations_url":"https://api.github.com/users/smblott-github/orgs","repos_url":"https://api.github.com/users/smblott-github/repos","events_url":"https://api.github.com/users/smblott-github/events{/privacy}","received_events_url":"https://api.github.com/users/smblott-github/received_events","type":"User","site_admin":false},"body":"This fixes some UI component initialization issues.  It's a long story...\r\n\r\nThe problem.\r\n\r\n- Go to this page: http://www.thejournal.ie/seanad-election-results-2016-2737768-Apr2016/\r\n- Click one of the links from the \"Most Popular\" box on the right.\r\n- Navigate back (`H`) and, as the original page is loading, activate the Vomnibar.\r\n\r\nIn 1.54 this renders Vimium unusable.  In `master` this renders the Vomnibar unsable, but the rest of Vimium usable.  Depending on how you set things up, you can generate these errors...\r\n\r\n![snapshot](https://cloud.githubusercontent.com/assets/2641335/14887272/f24a5086-0d4c-11e6-95e4-d61d406ffbdd.png)\r\n\r\n(Another error is that the `load` event never fires on the `@iframeElement`, but I cannot screenshot that.)\r\n\r\nIt seems the source of the issue is that we're initializing UI components too soon.  We need to wait until the `readyState` is \"complete\".  It's not clear *why* this is the case.  However, the example page above does use rather a lot of iframes, and I'm guessing their loading somehow interferes with the loading of the Vomnibar UI component.\r\n\r\nWith this PR:\r\n\r\n- The Vomnibar is initialised when the `readyState` is \"complete\" (in the top frame only, and only if Vimium is enabled).  Requests arriving prior to then are silently discarded.\r\n- The HUD is also initialized only when the `readyState` is \"complete\"; however, requests arriving before then are queued.  So, if the user immediately enters insert mode, then the \"Insert mode\" indicator will eventually be displayed.\r\n- The help dialog silently discards requests until the `readyState` is \"complete\".\r\n\r\nI'm posting this as a PR because:\r\n\r\n1. It needs some visibility.\r\n2. With this, if the `readyState` *never* reaches \"complete\", then the Vomnibar would be unusable.  And that's pretty serious.\r\n\r\nI'll run this live for a while and see how it gets on, then report back.\r\n\r\nThis would be a release blocker, except that the same (and worse) issues exist in 1.54.","created_at":"2016-04-28T13:40:18Z","updated_at":"2016-04-28T13:40:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/philc/vimium/pulls/2118/commits","review_comments_url":"https://api.github.com/repos/philc/vimium/pulls/2118/comments","review_comment_url":"https://api.github.com/repos/philc/vimium/pulls/comments{/number}","comments_url":"https://api.github.com/repos/philc/vimium/issues/2118/comments","statuses_url":"https://api.github.com/repos/philc/vimium/statuses/f83e99fd42a4cf412c79fb15c58f59c105c25723","head":{"label":"smblott-github:fix-ui-component-init-issues","ref":"fix-ui-component-init-issues","sha":"f83e99fd42a4cf412c79fb15c58f59c105c25723","user":{"login":"smblott-github","id":2641335,"avatar_url":"https://avatars.githubusercontent.com/u/2641335?v=3","gravatar_id":"","url":"https://api.github.com/users/smblott-github","html_url":"https://github.com/smblott-github","followers_url":"https://api.github.com/users/smblott-github/followers","following_url":"https://api.github.com/users/smblott-github/following{/other_user}","gists_url":"https://api.github.com/users/smblott-github/gists{/gist_id}","starred_url":"https://api.github.com/users/smblott-github/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smblott-github/subscriptions","organizations_url":"https://api.github.com/users/smblott-github/orgs","repos_url":"https://api.github.com/users/smblott-github/repos","events_url":"https://api.github.com/users/smblott-github/events{/privacy}","received_events_url":"https://api.github.com/users/smblott-github/received_events","type":"User","site_admin":false},"repo":{"id":18924701,"name":"vimium","full_name":"smblott-github/vimium","owner":{"login":"smblott-github","id":2641335,"avatar_url":"https://avatars.githubusercontent.com/u/2641335?v=3","gravatar_id":"","url":"https://api.github.com/users/smblott-github","html_url":"https://github.com/smblott-github","followers_url":"https://api.github.com/users/smblott-github/followers","following_url":"https://api.github.com/users/smblott-github/following{/other_user}","gists_url":"https://api.github.com/users/smblott-github/gists{/gist_id}","starred_url":"https://api.github.com/users/smblott-github/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smblott-github/subscriptions","organizations_url":"https://api.github.com/users/smblott-github/orgs","repos_url":"https://api.github.com/users/smblott-github/repos","events_url":"https://api.github.com/users/smblott-github/events{/privacy}","received_events_url":"https://api.github.com/users/smblott-github/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/smblott-github/vimium","description":"The hacker's browser.","fork":true,"url":"https://api.github.com/repos/smblott-github/vimium","forks_url":"https://api.github.com/repos/smblott-github/vimium/forks","keys_url":"https://api.github.com/repos/smblott-github/vimium/keys{/key_id}","collaborators_url":"https://api.github.com/repos/smblott-github/vimium/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/smblott-github/vimium/teams","hooks_url":"https://api.github.com/repos/smblott-github/vimium/hooks","issue_events_url":"https://api.github.com/repos/smblott-github/vimium/issues/events{/number}","events_url":"https://api.github.com/repos/smblott-github/vimium/events","assignees_url":"https://api.github.com/repos/smblott-github/vimium/assignees{/user}","branches_url":"https://api.github.com/repos/smblott-github/vimium/branches{/branch}","tags_url":"https://api.github.com/repos/smblott-github/vimium/tags","blobs_url":"https://api.github.com/repos/smblott-github/vimium/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/smblott-github/vimium/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/smblott-github/vimium/git/refs{/sha}","trees_url":"https://api.github.com/repos/smblott-github/vimium/git/trees{/sha}","statuses_url":"https://api.github.com/repos/smblott-github/vimium/statuses/{sha}","languages_url":"https://api.github.com/repos/smblott-github/vimium/languages","stargazers_url":"https://api.github.com/repos/smblott-github/vimium/stargazers","contributors_url":"https://api.github.com/repos/smblott-github/vimium/contributors","subscribers_url":"https://api.github.com/repos/smblott-github/vimium/subscribers","subscription_url":"https://api.github.com/repos/smblott-github/vimium/subscription","commits_url":"https://api.github.com/repos/smblott-github/vimium/commits{/sha}","git_commits_url":"https://api.github.com/repos/smblott-github/vimium/git/commits{/sha}","comments_url":"https://api.github.com/repos/smblott-github/vimium/comments{/number}","issue_comment_url":"https://api.github.com/repos/smblott-github/vimium/issues/comments{/number}","contents_url":"https://api.github.com/repos/smblott-github/vimium/contents/{+path}","compare_url":"https://api.github.com/repos/smblott-github/vimium/compare/{base}...{head}","merges_url":"https://api.github.com/repos/smblott-github/vimium/merges","archive_url":"https://api.github.com/repos/smblott-github/vimium/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/smblott-github/vimium/downloads","issues_url":"https://api.github.com/repos/smblott-github/vimium/issues{/number}","pulls_url":"https://api.github.com/repos/smblott-github/vimium/pulls{/number}","milestones_url":"https://api.github.com/repos/smblott-github/vimium/milestones{/number}","notifications_url":"https://api.github.com/repos/smblott-github/vimium/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/smblott-github/vimium/labels{/name}","releases_url":"https://api.github.com/repos/smblott-github/vimium/releases{/id}","deployments_url":"https://api.github.com/repos/smblott-github/vimium/deployments","created_at":"2014-04-18T20:29:25Z","updated_at":"2016-01-13T13:08:36Z","pushed_at":"2016-04-28T13:08:17Z","git_url":"git://github.com/smblott-github/vimium.git","ssh_url":"git@github.com:smblott-github/vimium.git","clone_url":"https://github.com/smblott-github/vimium.git","svn_url":"https://github.com/smblott-github/vimium","homepage":"","size":5448,"stargazers_count":1,"watchers_count":1,"language":"CoffeeScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"philc:master","ref":"master","sha":"fc8519e4e3a770253a35f1af7546d432f64392ea","user":{"login":"philc","id":8598,"avatar_url":"https://avatars.githubusercontent.com/u/8598?v=3","gravatar_id":"","url":"https://api.github.com/users/philc","html_url":"https://github.com/philc","followers_url":"https://api.github.com/users/philc/followers","following_url":"https://api.github.com/users/philc/following{/other_user}","gists_url":"https://api.github.com/users/philc/gists{/gist_id}","starred_url":"https://api.github.com/users/philc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/philc/subscriptions","organizations_url":"https://api.github.com/users/philc/orgs","repos_url":"https://api.github.com/users/philc/repos","events_url":"https://api.github.com/users/philc/events{/privacy}","received_events_url":"https://api.github.com/users/philc/received_events","type":"User","site_admin":false},"repo":{"id":312262,"name":"vimium","full_name":"philc/vimium","owner":{"login":"philc","id":8598,"avatar_url":"https://avatars.githubusercontent.com/u/8598?v=3","gravatar_id":"","url":"https://api.github.com/users/philc","html_url":"https://github.com/philc","followers_url":"https://api.github.com/users/philc/followers","following_url":"https://api.github.com/users/philc/following{/other_user}","gists_url":"https://api.github.com/users/philc/gists{/gist_id}","starred_url":"https://api.github.com/users/philc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/philc/subscriptions","organizations_url":"https://api.github.com/users/philc/orgs","repos_url":"https://api.github.com/users/philc/repos","events_url":"https://api.github.com/users/philc/events{/privacy}","received_events_url":"https://api.github.com/users/philc/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/philc/vimium","description":"The hacker's browser.","fork":false,"url":"https://api.github.com/repos/philc/vimium","forks_url":"https://api.github.com/repos/philc/vimium/forks","keys_url":"https://api.github.com/repos/philc/vimium/keys{/key_id}","collaborators_url":"https://api.github.com/repos/philc/vimium/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/philc/vimium/teams","hooks_url":"https://api.github.com/repos/philc/vimium/hooks","issue_events_url":"https://api.github.com/repos/philc/vimium/issues/events{/number}","events_url":"https://api.github.com/repos/philc/vimium/events","assignees_url":"https://api.github.com/repos/philc/vimium/assignees{/user}","branches_url":"https://api.github.com/repos/philc/vimium/branches{/branch}","tags_url":"https://api.github.com/repos/philc/vimium/tags","blobs_url":"https://api.github.com/repos/philc/vimium/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/philc/vimium/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/philc/vimium/git/refs{/sha}","trees_url":"https://api.github.com/repos/philc/vimium/git/trees{/sha}","statuses_url":"https://api.github.com/repos/philc/vimium/statuses/{sha}","languages_url":"https://api.github.com/repos/philc/vimium/languages","stargazers_url":"https://api.github.com/repos/philc/vimium/stargazers","contributors_url":"https://api.github.com/repos/philc/vimium/contributors","subscribers_url":"https://api.github.com/repos/philc/vimium/subscribers","subscription_url":"https://api.github.com/repos/philc/vimium/subscription","commits_url":"https://api.github.com/repos/philc/vimium/commits{/sha}","git_commits_url":"https://api.github.com/repos/philc/vimium/git/commits{/sha}","comments_url":"https://api.github.com/repos/philc/vimium/comments{/number}","issue_comment_url":"https://api.github.com/repos/philc/vimium/issues/comments{/number}","contents_url":"https://api.github.com/repos/philc/vimium/contents/{+path}","compare_url":"https://api.github.com/repos/philc/vimium/compare/{base}...{head}","merges_url":"https://api.github.com/repos/philc/vimium/merges","archive_url":"https://api.github.com/repos/philc/vimium/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/philc/vimium/downloads","issues_url":"https://api.github.com/repos/philc/vimium/issues{/number}","pulls_url":"https://api.github.com/repos/philc/vimium/pulls{/number}","milestones_url":"https://api.github.com/repos/philc/vimium/milestones{/number}","notifications_url":"https://api.github.com/repos/philc/vimium/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/philc/vimium/labels{/name}","releases_url":"https://api.github.com/repos/philc/vimium/releases{/id}","deployments_url":"https://api.github.com/repos/philc/vimium/deployments","created_at":"2009-09-20T07:08:19Z","updated_at":"2016-04-28T07:22:23Z","pushed_at":"2016-04-28T05:53:48Z","git_url":"git://github.com/philc/vimium.git","ssh_url":"git@github.com:philc/vimium.git","clone_url":"https://github.com/philc/vimium.git","svn_url":"https://github.com/philc/vimium","homepage":"","size":7850,"stargazers_count":4630,"watchers_count":4630,"language":"CoffeeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":670,"mirror_url":null,"open_issues_count":75,"forks":670,"open_issues":75,"watchers":4630,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/philc/vimium/pulls/2118"},"html":{"href":"https://github.com/philc/vimium/pull/2118"},"issue":{"href":"https://api.github.com/repos/philc/vimium/issues/2118"},"comments":{"href":"https://api.github.com/repos/philc/vimium/issues/2118/comments"},"review_comments":{"href":"https://api.github.com/repos/philc/vimium/pulls/2118/comments"},"review_comment":{"href":"https://api.github.com/repos/philc/vimium/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/philc/vimium/pulls/2118/commits"},"statuses":{"href":"https://api.github.com/repos/philc/vimium/statuses/f83e99fd42a4cf412c79fb15c58f59c105c25723"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":32,"deletions":19,"changed_files":5}}