fix for IE 11
IE 11 reports a `CustomEvent` object
more explicit comparisions
refactor submit handling within modal to account for dynamically added forms
correctly deals with submits of forms of type dialog
merged upstream
merged upstream
wierd merge
conforming to whitespace
EOF newline
Merge pull request #14 from uniqname/patch-1

IE 11 reports a `CustomEvent` object