{"action":"created","issue":{"url":"https://api.github.com/repos/The-Compiler/qutebrowser/issues/219","repository_url":"https://api.github.com/repos/The-Compiler/qutebrowser","labels_url":"https://api.github.com/repos/The-Compiler/qutebrowser/issues/219/labels{/name}","comments_url":"https://api.github.com/repos/The-Compiler/qutebrowser/issues/219/comments","events_url":"https://api.github.com/repos/The-Compiler/qutebrowser/issues/219/events","html_url":"https://github.com/The-Compiler/qutebrowser/issues/219","id":46893281,"number":219,"title":"\"Focus first input\" command / autoselect first hint","user":{"login":"The-Compiler","id":625793,"avatar_url":"https://avatars.githubusercontent.com/u/625793?v=3","gravatar_id":"","url":"https://api.github.com/users/The-Compiler","html_url":"https://github.com/The-Compiler","followers_url":"https://api.github.com/users/The-Compiler/followers","following_url":"https://api.github.com/users/The-Compiler/following{/other_user}","gists_url":"https://api.github.com/users/The-Compiler/gists{/gist_id}","starred_url":"https://api.github.com/users/The-Compiler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/The-Compiler/subscriptions","organizations_url":"https://api.github.com/users/The-Compiler/orgs","repos_url":"https://api.github.com/users/The-Compiler/repos","events_url":"https://api.github.com/users/The-Compiler/events{/privacy}","received_events_url":"https://api.github.com/users/The-Compiler/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/The-Compiler/qutebrowser/labels/component:%20hints","name":"component: hints","color":"5319e7"},{"url":"https://api.github.com/repos/The-Compiler/qutebrowser/labels/easy","name":"easy","color":"006b75"},{"url":"https://api.github.com/repos/The-Compiler/qutebrowser/labels/priority:%202%20-%20low","name":"priority: 2 - low","color":"009800"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2014-10-27T11:09:45Z","updated_at":"2016-08-07T06:29:35Z","closed_at":null,"body":"`gi` in dwb/Vimium. Requested by rafi in IRC.\r\n\r\nSee also #13 \r\n\r\ndwb implementation (js):\r\n\r\n```js\r\n    var p_focusInput = function()\r\n    {\r\n        var i;\r\n        var res = document.body.querySelectorAll('input[type=text], input[type=password], textarea');\r\n        if (res.length === 0)\r\n        {\r\n            return \"_dwb_no_input_\";\r\n        }\r\n        var styles = document.styleSheets[0];\r\n        styles.insertRule('input:focus { outline: 2px solid #1793d1; }', 0);\r\n        if (!globals.activeInput)\r\n        {\r\n            globals.activeInput = res[0];\r\n        }\r\n        else\r\n        {\r\n            for (i=0; i<res.length; i++)\r\n            {\r\n                if (res[i] == globals.activeInput)\r\n                {\r\n                    globals.activeInput = res[i+1] || res[0];\r\n                    break;\r\n                }\r\n            }\r\n        }\r\n        globals.activeInput.focus();\r\n    }\r\n```\r\n\r\nThough probably we should just implement a `--first` flag or so for hints, which automatically selects the first one."},"comment":{"url":"https://api.github.com/repos/The-Compiler/qutebrowser/issues/comments/238066450","html_url":"https://github.com/The-Compiler/qutebrowser/issues/219#issuecomment-238066450","issue_url":"https://api.github.com/repos/The-Compiler/qutebrowser/issues/219","id":238066450,"user":{"login":"Eisfreak7","id":3799330,"avatar_url":"https://avatars.githubusercontent.com/u/3799330?v=3","gravatar_id":"","url":"https://api.github.com/users/Eisfreak7","html_url":"https://github.com/Eisfreak7","followers_url":"https://api.github.com/users/Eisfreak7/followers","following_url":"https://api.github.com/users/Eisfreak7/following{/other_user}","gists_url":"https://api.github.com/users/Eisfreak7/gists{/gist_id}","starred_url":"https://api.github.com/users/Eisfreak7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Eisfreak7/subscriptions","organizations_url":"https://api.github.com/users/Eisfreak7/orgs","repos_url":"https://api.github.com/users/Eisfreak7/repos","events_url":"https://api.github.com/users/Eisfreak7/events{/privacy}","received_events_url":"https://api.github.com/users/Eisfreak7/received_events","type":"User","site_admin":false},"created_at":"2016-08-07T06:29:35Z","updated_at":"2016-08-07T06:29:35Z","body":"I disagree, that is a different feature.\r\nFor  example, to type in this answer, I just hit `gi` (pentadactyl) and immediately was in the answer field. I don't know exactly how it works, but somehow `gi` selects nearly always the \"correct\" Input, even if there are multiple possible hints like on github."}}
{"actor":{"display_login":"Eisfreak7"}}