Fixed bug that created extra nodes.

Hey!

I fixed the bug that created those extra nodes. The problem happens when the event listener catches the clicks before the dialog and then delivers them after hitting cancel. I fixed the problem by using a timer to ignore the mouse clicks for 100 ms after the dialog closes.

The changes have been pushed up to my repository. You can get my code by accepting my pull request on github and then pulling in the new changes on your local computer. Let me know if you have any questions or need help.

-Josh :D