{"action":"opened","issue":{"url":"https://api.github.com/repos/mzabriskie/react-draggable/issues/315","repository_url":"https://api.github.com/repos/mzabriskie/react-draggable","labels_url":"https://api.github.com/repos/mzabriskie/react-draggable/issues/315/labels{/name}","comments_url":"https://api.github.com/repos/mzabriskie/react-draggable/issues/315/comments","events_url":"https://api.github.com/repos/mzabriskie/react-draggable/issues/315/events","html_url":"https://github.com/mzabriskie/react-draggable/issues/315","id":298386318,"number":315,"title":"When Draggable unmounts, if a textbox is focused, the textbox loses focus inexplicably","user":{"login":"lukeknep","id":2231828,"avatar_url":"https://avatars1.githubusercontent.com/u/2231828?v=4","gravatar_id":"","url":"https://api.github.com/users/lukeknep","html_url":"https://github.com/lukeknep","followers_url":"https://api.github.com/users/lukeknep/followers","following_url":"https://api.github.com/users/lukeknep/following{/other_user}","gists_url":"https://api.github.com/users/lukeknep/gists{/gist_id}","starred_url":"https://api.github.com/users/lukeknep/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lukeknep/subscriptions","organizations_url":"https://api.github.com/users/lukeknep/orgs","repos_url":"https://api.github.com/users/lukeknep/repos","events_url":"https://api.github.com/users/lukeknep/events{/privacy}","received_events_url":"https://api.github.com/users/lukeknep/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-02-19T19:56:55Z","updated_at":"2018-02-19T19:56:55Z","closed_at":null,"author_association":"NONE","body":"My app renders some Items depending on the content of several text input.\r\n\r\nThe Items each contain a Draggable.\r\n\r\nI'm coming across this very strange behavior:\r\n- I type a valid value into a textbox, causing some Items to render\r\n- Without leaving the textbox, I delete or add a few characters to make the value invalid\r\n- The Items disappear (unmount)\r\n- My textbox suddenly loses focus. However, no `onBlur` handlers are called, and if I switch tabs / windows and then switch back, focus is restored\r\n- I can prevent this issue by deleting the Draggable component\r\n\r\nHere's how I'm using Draggable:\r\n```\r\n            <Draggable\r\n              axis='x'\r\n              bounds='parent'\r\n              position={{\r\n                x: thumbnailWidth - 15,\r\n                y: 0,\r\n              }}\r\n              onDrag={this.handleThumbnailResize}\r\n              key={2}\r\n            >\r\n```\r\n\r\nI can consistently reproduce this."}}
{"actor":{"display_login":"lukeknep"}}