jQuery UI Autocomplete with jsfiddle echo json

http://bugs.jqueryui.com/ticket/7230

HTML

<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.11/themes/base/jquery-ui.css">
<div id="autocom-div">
    <div id="autocomplete">
        <button>Click me!</button>
</div></div>

CSS

body{font:62.5% Verdana,Arial,sans-serif;}

#autocomplete {
    width: 100px !important;
    height: 50px !important;
    min-height: 50px !important;
    border: solid 1px black;
    padding: 0 !important;
    margin: 10px !important;
}

.ui-dialog {
    height: 200px !important;
}

JavaScript

$( "button" ).click(function(){
    var clone = $('#autocomplete').clone();
    $("#autocomplete").detach().dialog({
        close: function(){
            $('#autocom-div').prepend(clone);
            $(this).dialog('destroy').remove();
            $(this).autocomplete('destroy');

        }
    });
});