{"action":"created","issue":{"url":"https://api.github.com/repos/philc/vimium/issues/2072","repository_url":"https://api.github.com/repos/philc/vimium","labels_url":"https://api.github.com/repos/philc/vimium/issues/2072/labels{/name}","comments_url":"https://api.github.com/repos/philc/vimium/issues/2072/comments","events_url":"https://api.github.com/repos/philc/vimium/issues/2072/events","html_url":"https://github.com/philc/vimium/pull/2072","id":143966711,"number":2072,"title":"Do not grab back focused input on URL change.","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},"labels":[{"url":"https://api.github.com/repos/philc/vimium/labels/smb-watching","name":"smb-watching","color":"bfd4f2"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-03-28T12:37:25Z","updated_at":"2016-03-29T15:07:15Z","closed_at":"2016-03-29T15:07:15Z","pull_request":{"url":"https://api.github.com/repos/philc/vimium/pulls/2072","html_url":"https://github.com/philc/vimium/pull/2072","diff_url":"https://github.com/philc/vimium/pull/2072.diff","patch_url":"https://github.com/philc/vimium/pull/2072.patch"},"body":"Currently, if grab-back-focus is enabled, then we grab back the focus on a URL change -- including blurring any already focused input.\r\n\r\nOn some pages, e.g. Google Inbox, it is that act of focusing an input which triggers a URL change, and in such cases, we should not blur the input.\r\n\r\nThis is a refinement of #1622.  We still grab back the focus after a URL change if it is the page which focuses the input."},"comment":{"url":"https://api.github.com/repos/philc/vimium/issues/comments/202944845","html_url":"https://github.com/philc/vimium/pull/2072#issuecomment-202944845","issue_url":"https://api.github.com/repos/philc/vimium/issues/2072","id":202944845,"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},"created_at":"2016-03-29T15:07:15Z","updated_at":"2016-03-29T15:07:15Z","body":"Closing this.\r\nOn reflection, I don't think this is the source of the problem.  Here's the story...\r\n\r\nI've seen cases where we get locked in grab-back-focus mode on Google inbox.  There's simply nothing you can do to select the \"search\" input.\r\n\r\nI now think it's a race condition, and it's fixed here... 77a2c6b41959f978147bd953ac94f5484394b276 (hopefully).\r\n\r\nInbox is a pretty busy page, so likely to trigger race conditions.  What I think is happening is that we're seeing a `keydown` (and exiting grab-back-focus mode) *before* the settings are ready, so *before* we install the grab-back-focus `focus` listener.  So that listener keeps kicking us out of insert mode.  And, because the mode has already exited, the `keydown` and `mousedown` event listeners have already been removed, so there's nothing left to remove the `focus` listener.  Hence we're stuck."}}