{"action":"closed","issue":{"url":"https://api.github.com/repos/mozilla/universal-search/issues/39","repository_url":"https://api.github.com/repos/mozilla/universal-search","labels_url":"https://api.github.com/repos/mozilla/universal-search/issues/39/labels{/name}","comments_url":"https://api.github.com/repos/mozilla/universal-search/issues/39/comments","events_url":"https://api.github.com/repos/mozilla/universal-search/issues/39/events","html_url":"https://github.com/mozilla/universal-search/issues/39","id":136231059,"number":39,"title":"manage mouse highlight","user":{"login":"6a68","id":96396,"avatar_url":"https://avatars.githubusercontent.com/u/96396?v=3","gravatar_id":"","url":"https://api.github.com/users/6a68","html_url":"https://github.com/6a68","followers_url":"https://api.github.com/users/6a68/followers","following_url":"https://api.github.com/users/6a68/following{/other_user}","gists_url":"https://api.github.com/users/6a68/gists{/gist_id}","starred_url":"https://api.github.com/users/6a68/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/6a68/subscriptions","organizations_url":"https://api.github.com/users/6a68/orgs","repos_url":"https://api.github.com/users/6a68/repos","events_url":"https://api.github.com/users/6a68/events{/privacy}","received_events_url":"https://api.github.com/users/6a68/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mozilla/universal-search/labels/size:medium","name":"size:medium","color":"eb6420"},{"url":"https://api.github.com/repos/mozilla/universal-search/labels/status:in%20progress","name":"status:in progress","color":"888888"}],"state":"closed","locked":false,"assignee":{"login":"6a68","id":96396,"avatar_url":"https://avatars.githubusercontent.com/u/96396?v=3","gravatar_id":"","url":"https://api.github.com/users/6a68","html_url":"https://github.com/6a68","followers_url":"https://api.github.com/users/6a68/followers","following_url":"https://api.github.com/users/6a68/following{/other_user}","gists_url":"https://api.github.com/users/6a68/gists{/gist_id}","starred_url":"https://api.github.com/users/6a68/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/6a68/subscriptions","organizations_url":"https://api.github.com/users/6a68/orgs","repos_url":"https://api.github.com/users/6a68/repos","events_url":"https://api.github.com/users/6a68/events{/privacy}","received_events_url":"https://api.github.com/users/6a68/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/mozilla/universal-search/milestones/1","html_url":"https://github.com/mozilla/universal-search/milestones/3-25-16","labels_url":"https://api.github.com/repos/mozilla/universal-search/milestones/1/labels","id":1575466,"number":1,"title":"3-25-16","description":"","creator":{"login":"chuckharmston","id":23885,"avatar_url":"https://avatars.githubusercontent.com/u/23885?v=3","gravatar_id":"","url":"https://api.github.com/users/chuckharmston","html_url":"https://github.com/chuckharmston","followers_url":"https://api.github.com/users/chuckharmston/followers","following_url":"https://api.github.com/users/chuckharmston/following{/other_user}","gists_url":"https://api.github.com/users/chuckharmston/gists{/gist_id}","starred_url":"https://api.github.com/users/chuckharmston/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chuckharmston/subscriptions","organizations_url":"https://api.github.com/users/chuckharmston/orgs","repos_url":"https://api.github.com/users/chuckharmston/repos","events_url":"https://api.github.com/users/chuckharmston/events{/privacy}","received_events_url":"https://api.github.com/users/chuckharmston/received_events","type":"User","site_admin":false},"open_issues":14,"closed_issues":30,"state":"open","created_at":"2016-02-10T18:35:16Z","updated_at":"2016-03-17T19:39:14Z","due_on":"2016-03-25T07:00:00Z","closed_at":null},"comments":0,"created_at":"2016-02-25T00:07:31Z","updated_at":"2016-03-17T19:39:14Z","closed_at":"2016-03-17T19:39:14Z","body":"Existing behavior:\r\n- as you mouse over items in the popup, a mousemove listener ([autocomplete.xml, around line 2050](https://dxr.mozilla.org/mozilla-central/source/toolkit/content/widgets/autocomplete.xml#2051)) on the `richlistbox` sets `selectedIndex` of the popup to the hovered item.\r\n- if you mouse out of the popup, the last hovered item stays highlighted\r\n\r\nIntegrating the recommendation into the existing hover behavior:\r\n- when the user mouses into the recommendation node (not sure about mouseenter vs mousemove for this), highlight the recommendation, and remove the highlight from the richlistbox by setting `popup.selectedIndex = -1`.\r\n- when the user mouses out of the recommendation node, we want to keep the recommendation highlighted if they are mousing out of the popup, but remove the highlight if they are mousing into the richlistbox. `mouseleave` events expose a `relatedTarget` property that might tell us what we need to know--or we just setTimeout, then check to see if the selectedIndex isn't -1.\r\n\r\nI'm honestly not sure if this should be the responsibility of the highlight manager, or the recommendation view, or even the popup: the highlight manager is currently the only thing that knows about the popup's highlight state, but mouse events on the recommendation element seem like the concern of the recommendation view. Maybe the answer is to roll the highlight manager into the popup, which does basically nothing right now. Any solution that works, works; the current division of labor among the components is just a guess."}}