{"action":"created","issue":{"url":"https://api.github.com/repos/electron/electron/issues/7939","repository_url":"https://api.github.com/repos/electron/electron","labels_url":"https://api.github.com/repos/electron/electron/issues/7939/labels{/name}","comments_url":"https://api.github.com/repos/electron/electron/issues/7939/comments","events_url":"https://api.github.com/repos/electron/electron/issues/7939/events","html_url":"https://github.com/electron/electron/issues/7939","id":188697070,"number":7939,"title":"<webview>'s .focus() method gives focus to all webviews in window","user":{"login":"rhysd","id":823277,"avatar_url":"https://avatars.githubusercontent.com/u/823277?v=3","gravatar_id":"","url":"https://api.github.com/users/rhysd","html_url":"https://github.com/rhysd","followers_url":"https://api.github.com/users/rhysd/followers","following_url":"https://api.github.com/users/rhysd/following{/other_user}","gists_url":"https://api.github.com/users/rhysd/gists{/gist_id}","starred_url":"https://api.github.com/users/rhysd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rhysd/subscriptions","organizations_url":"https://api.github.com/users/rhysd/orgs","repos_url":"https://api.github.com/users/rhysd/repos","events_url":"https://api.github.com/users/rhysd/events{/privacy}","received_events_url":"https://api.github.com/users/rhysd/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-11-11T06:53:45Z","updated_at":"2016-11-12T01:36:11Z","closed_at":null,"body":"<!--\r\nThanks for opening an issue! A few things to keep in mind:\r\n\r\n- The issue tracker is only for bugs and feature requests.\r\n- Before reporting a bug, please try reproducing your issue against\r\n  the latest version of Electron.\r\n- If you need general advice, join our Slack: http://atom-slack.herokuapp.com\r\n-->\r\n\r\n* Electron version: 1.4.6\r\n* Operating system: OS X 10.11\r\n\r\n### Expected behavior\r\n\r\n`webview.focus()` Gives focus only to the method's receiver webview\r\n\r\n### Actual behavior\r\n\r\n`webview.focus()` gives focus to ALL webviews in the browser window\r\n\r\n\r\n### How to reproduce\r\n\r\nI created a test app to reproduce this.\r\n\r\nhttps://gist.github.com/rhysd/bf8015c0ae8e58fcb63aad6b469550ca\r\n\r\nPlease copy all files to one directory and execute `electron .` in it. It opens the window which contains one button and two webviews with DevTools.\r\n\r\nThen please click button and see the console. Button callback calls only one webview's `.focus()` method but both two webviews are given focus.\r\n\r\nI took a screenshot:\r\n\r\n![tmp](https://cloud.githubusercontent.com/assets/823277/20206890/ed65f0dc-a826-11e6-9082-81c689babcf4.gif)\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/electron/electron/issues/comments/260092700","html_url":"https://github.com/electron/electron/issues/7939#issuecomment-260092700","issue_url":"https://api.github.com/repos/electron/electron/issues/7939","id":260092700,"user":{"login":"xywz","id":16139904,"avatar_url":"https://avatars.githubusercontent.com/u/16139904?v=3","gravatar_id":"","url":"https://api.github.com/users/xywz","html_url":"https://github.com/xywz","followers_url":"https://api.github.com/users/xywz/followers","following_url":"https://api.github.com/users/xywz/following{/other_user}","gists_url":"https://api.github.com/users/xywz/gists{/gist_id}","starred_url":"https://api.github.com/users/xywz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xywz/subscriptions","organizations_url":"https://api.github.com/users/xywz/orgs","repos_url":"https://api.github.com/users/xywz/repos","events_url":"https://api.github.com/users/xywz/events{/privacy}","received_events_url":"https://api.github.com/users/xywz/received_events","type":"User","site_admin":false},"created_at":"2016-11-12T01:36:11Z","updated_at":"2016-11-12T01:36:11Z","body":"Both listeners are attached to the same webview."}}
{"actor":{"display_login":"xywz"}}