{"action":"opened","issue":{"url":"https://api.github.com/repos/bustlelabs/mobiledoc-kit/issues/388","repository_url":"https://api.github.com/repos/bustlelabs/mobiledoc-kit","labels_url":"https://api.github.com/repos/bustlelabs/mobiledoc-kit/issues/388/labels{/name}","comments_url":"https://api.github.com/repos/bustlelabs/mobiledoc-kit/issues/388/comments","events_url":"https://api.github.com/repos/bustlelabs/mobiledoc-kit/issues/388/events","html_url":"https://github.com/bustlelabs/mobiledoc-kit/issues/388","id":154033828,"number":388,"title":"fix failing FF tests","user":{"login":"bantic","id":2023,"avatar_url":"https://avatars.githubusercontent.com/u/2023?v=3","gravatar_id":"","url":"https://api.github.com/users/bantic","html_url":"https://github.com/bantic","followers_url":"https://api.github.com/users/bantic/followers","following_url":"https://api.github.com/users/bantic/following{/other_user}","gists_url":"https://api.github.com/users/bantic/gists{/gist_id}","starred_url":"https://api.github.com/users/bantic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bantic/subscriptions","organizations_url":"https://api.github.com/users/bantic/orgs","repos_url":"https://api.github.com/users/bantic/repos","events_url":"https://api.github.com/users/bantic/events{/privacy}","received_events_url":"https://api.github.com/users/bantic/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-05-10T15:19:37Z","updated_at":"2016-05-10T15:19:37Z","closed_at":null,"body":"Firefox changed its behavior when focusing a content editable element in version 46, and this is causing the SauceLabs tests to fail. When we render the editor in a browser window that is not active, if `options.autofocus` is true, the editor [focuses its element](https://github.com/bustlelabs/mobiledoc-kit/blob/master/src/js/editor/editor.js#L251). In Chrome, Safari, and previous versions of Firefox this makes the element the `document.activeElement` and also sets the `Selection` at the end of its content. In newer Firefox `window.getSelection === document.body`, rather than the expected text node at the end of the editor's element. This causes a number of tests to fail at SauceLabs on Firefox because it does not appear to be the frontmost/active window while tests are running."}}