Dojo Dialog onEnd() animation exception

http://stackoverflow.com/questions/12679110/dojo-dialog-onend-animation-exception

HTML

<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/dojo/1.7.1/dijit/themes/claro/claro.css">

JavaScript

require(["dojo/on", "dijit/Dialog", "dojo/domReady!"
], function(on, Dialog) {
    
    var global_welcome = new Dialog({
        id: 'global_welcome',
        style: "width: 200px; height: 200px;",
        draggable: true,
        content: '<button type="button" id="global_welcomeCancel"> Cancel </button>',
        onShow : function () {
            on(dojo.byId('global_welcomeCancel'), "click", function (evt) {
                dojo.stopEvent(evt);
                global_welcome.hide();   
            });
        }
    });
    
    global_welcome.show();
});