maqetta/maqetta — comment on commit cdbe110b5e180b47c86fe537f416324cab743de4
File: maqetta.core.client/WebContent/davinci/ui/widgets/NewFile.js line 72
By JonFerraiolo:

I don't remember why exactly, but I tried to put this in the template but couldn't get it to work. There is an issue with Dojo templating where certain things like event handler registration only work if done after things are added to the DOM, but with templates there is a Catch-22 problem (I saw discussion of this on the Web), and I discovered that the only way around it was to add the button via JavaScript. It took a few hours to figure all of this out. It would be nice if the Dojo docs actually explained these limitations rather than requiring each and every developer to re-discover them.