{"action":"created","issue":{"url":"https://api.github.com/repos/cocos2d/cocos2d-x/issues/10683","labels_url":"https://api.github.com/repos/cocos2d/cocos2d-x/issues/10683/labels{/name}","comments_url":"https://api.github.com/repos/cocos2d/cocos2d-x/issues/10683/comments","events_url":"https://api.github.com/repos/cocos2d/cocos2d-x/issues/10683/events","html_url":"https://github.com/cocos2d/cocos2d-x/pull/10683","id":59414452,"number":10683,"title":"Fix editbox on Mac","user":{"login":"Mazyod","id":860511,"avatar_url":"https://avatars.githubusercontent.com/u/860511?v=3","gravatar_id":"","url":"https://api.github.com/users/Mazyod","html_url":"https://github.com/Mazyod","followers_url":"https://api.github.com/users/Mazyod/followers","following_url":"https://api.github.com/users/Mazyod/following{/other_user}","gists_url":"https://api.github.com/users/Mazyod/gists{/gist_id}","starred_url":"https://api.github.com/users/Mazyod/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mazyod/subscriptions","organizations_url":"https://api.github.com/users/Mazyod/orgs","repos_url":"https://api.github.com/users/Mazyod/repos","events_url":"https://api.github.com/users/Mazyod/events{/privacy}","received_events_url":"https://api.github.com/users/Mazyod/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/cocos2d/cocos2d-x/labels/need%20to%20merge%20to%20v4-develop","name":"need to merge to v4-develop","color":"bfdadc"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/cocos2d/cocos2d-x/milestones/11","html_url":"https://github.com/cocos2d/cocos2d-x/milestones/v3.5rc0","labels_url":"https://api.github.com/repos/cocos2d/cocos2d-x/milestones/11/labels","id":979999,"number":11,"title":"v3.5rc0","description":"","creator":{"login":"minggo","id":488203,"avatar_url":"https://avatars.githubusercontent.com/u/488203?v=3","gravatar_id":"","url":"https://api.github.com/users/minggo","html_url":"https://github.com/minggo","followers_url":"https://api.github.com/users/minggo/followers","following_url":"https://api.github.com/users/minggo/following{/other_user}","gists_url":"https://api.github.com/users/minggo/gists{/gist_id}","starred_url":"https://api.github.com/users/minggo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/minggo/subscriptions","organizations_url":"https://api.github.com/users/minggo/orgs","repos_url":"https://api.github.com/users/minggo/repos","events_url":"https://api.github.com/users/minggo/events{/privacy}","received_events_url":"https://api.github.com/users/minggo/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":2,"state":"open","created_at":"2015-02-15T11:46:36Z","updated_at":"2015-03-11T02:01:00Z","due_on":"2015-03-12T16:00:00Z","closed_at":null},"comments":6,"created_at":"2015-03-01T19:59:48Z","updated_at":"2015-03-11T06:15:08Z","closed_at":"2015-03-11T02:00:50Z","pull_request":{"url":"https://api.github.com/repos/cocos2d/cocos2d-x/pulls/10683","html_url":"https://github.com/cocos2d/cocos2d-x/pull/10683","diff_url":"https://github.com/cocos2d/cocos2d-x/pull/10683.diff","patch_url":"https://github.com/cocos2d/cocos2d-x/pull/10683.patch"},"body":"**Brief**:\r\n\r\nEditbox on iOS removes the native textfield in `closeKeyboard`, and the adds the textfield again in `openKeyboard`:\r\nhttps://github.com/cocos2d/cocos2d-x/blob/v3/cocos/ui/UIEditBox/UIEditBoxImpl-ios.mm#L121\r\n\r\nBut, in Mac OS, the editbox is removed in `closeKeyboard`, and never added back in `openKeyboard`. This causes the textfield to disappear once it's removed from the scene, even if you try to add it back in:\r\nhttps://github.com/cocos2d/cocos2d-x/blob/v3/cocos/ui/UIEditBox/UIEditBoxImpl-mac.mm#L184\r\n\r\nThis PR fixes this issue, by tracking which textfield is being used, then adds the textfield back to the view hierarchy as appropriate.\r\n\r\nTested on my game.\r\n\r\nThanks,\r\nMaz"},"comment":{"url":"https://api.github.com/repos/cocos2d/cocos2d-x/issues/comments/78211031","html_url":"https://github.com/cocos2d/cocos2d-x/pull/10683#issuecomment-78211031","issue_url":"https://api.github.com/repos/cocos2d/cocos2d-x/issues/10683","id":78211031,"user":{"login":"minggo","id":488203,"avatar_url":"https://avatars.githubusercontent.com/u/488203?v=3","gravatar_id":"","url":"https://api.github.com/users/minggo","html_url":"https://github.com/minggo","followers_url":"https://api.github.com/users/minggo/followers","following_url":"https://api.github.com/users/minggo/following{/other_user}","gists_url":"https://api.github.com/users/minggo/gists{/gist_id}","starred_url":"https://api.github.com/users/minggo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/minggo/subscriptions","organizations_url":"https://api.github.com/users/minggo/orgs","repos_url":"https://api.github.com/users/minggo/repos","events_url":"https://api.github.com/users/minggo/events{/privacy}","received_events_url":"https://api.github.com/users/minggo/received_events","type":"User","site_admin":false},"created_at":"2015-03-11T06:15:08Z","updated_at":"2015-03-11T06:15:08Z","body":"Thanks."}}