Ticket #5935 (closed defect: fixed)
clicking submit button when not on form.Form causes error
| Reported by: | guest | Owned by: | doughays |
|---|---|---|---|
| Priority: | normal | Milestone: | 1.1 |
| Component: | Dijit | Version: | 1.1b1 |
| Severity: | normal | Keywords: | |
| Cc: |
Description
Have an <input type="submit"> on a page that's not on a dijit.form.Form. Click the button and get a 'node.getAttribute is not a function' in FF, similar in IE. Fails because _onButtonClick walks up the parent chain and eventually hits the document.
<html> <head> <LINK REL="stylesheet" TYPE="text/css" HREF="../js/dojo-release-1.1b1/dijit/themes/tundra/tundra.css"> <LINK REL="stylesheet" TYPE="text/css" HREF="../js/dojo-release-1.1b1/dojo/resources/dojo.css">
<SCRIPT LANGUAGE="JAVASCRIPT" SRC="../js/dojo-release-1.1b1/dojo/dojo.js.uncompressed.js" djConfig="parseOnLoad: true">
</SCRIPT>
<script type="text/javascript"> dojo.require("dojo.parser"); dojo.require("dijit.form.Button");
</script> </head> <body class="tundra"> <input type="submit" dojoType="dijit.form.Button" > "Click" </input> </body> </html>