{"action":"closed","issue":{"url":"https://api.github.com/repos/jquery/jquery-mobile/issues/6924","repository_url":"https://api.github.com/repos/jquery/jquery-mobile","labels_url":"https://api.github.com/repos/jquery/jquery-mobile/issues/6924/labels{/name}","comments_url":"https://api.github.com/repos/jquery/jquery-mobile/issues/6924/comments","events_url":"https://api.github.com/repos/jquery/jquery-mobile/issues/6924/events","html_url":"https://github.com/jquery/jquery-mobile/issues/6924","id":25458925,"number":6924,"title":"Bug: Selector instead of its children() is deleted when .empty() is called as a text input is one of the selector's children.","user":{"login":"jessemao","id":1606623,"avatar_url":"https://avatars.githubusercontent.com/u/1606623?v=3","gravatar_id":"","url":"https://api.github.com/users/jessemao","html_url":"https://github.com/jessemao","followers_url":"https://api.github.com/users/jessemao/followers","following_url":"https://api.github.com/users/jessemao/following{/other_user}","gists_url":"https://api.github.com/users/jessemao/gists{/gist_id}","starred_url":"https://api.github.com/users/jessemao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jessemao/subscriptions","organizations_url":"https://api.github.com/users/jessemao/orgs","repos_url":"https://api.github.com/users/jessemao/repos","events_url":"https://api.github.com/users/jessemao/events{/privacy}","received_events_url":"https://api.github.com/users/jessemao/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2014-01-12T08:31:53Z","updated_at":"2016-05-08T10:46:06Z","closed_at":"2016-05-08T10:46:06Z","body":"Hi, I have run into an issue with JQM 1.4.0 that when I use $('selector').empty() to clear its children, this function removed the selector instead of the children. Please see the attached image below. \r\n\r\nThe DOM, \r\n![image](https://f.cloud.github.com/assets/1606623/1895812/713a131e-7b63-11e3-94bd-7d1928d9d9a2.png)\r\n\r\nthen I called $('#dbconnection-query-parameters').empty()\r\n![image](https://f.cloud.github.com/assets/1606623/1895820/9f9f102e-7b63-11e3-90a1-a250fc446737.png)\r\n\r\nthis is what I have got. \r\n\r\nI have tried on some other elements as well and keep getting this issue. Please let me know if I am doing something wrong or there is some solution for it! \r\n\r\nThank you!\r\n\r\nBests,\r\n\r\nJingxian"}}