yui/yui3 — pull request #1296 by derek (2013-10-10 01:08:02+00:00)
Title: Defaulting Y.ButtonCore's template to type=button (#973, #968)

As issue https://github.com/yui/yui3/pull/968 mentions, any Buttons rendered without a `host`/`srcNode` config option will default to `type=submit`. This is the correct behavior for any `` element without a `type` attribute ([spec](http://www.whatwg.org/specs/web-apps/current-work/multipage/the-button-element.html#the-button-element)), however, in the context of Y.Button, that is certainly not the ideal default. It is much more likely that someone would like to listen in on a click events instead of submit the parent form. So this change updates the default `TEMPLATE` to include `type=button`.

If the intent actually is to have `type=submit`, the implementer can either override Y.ButtonCore.prototype.TEMPLATE, or specify it in a new Y.Node instance in the config (as a new test does).

✓ Testing started on Firefox (24.0) / Mac OS, Chrome (30.0.1599.69) / Mac OS, Safari (6.0.5) / Mac OS, Safari (4.0) / Linux, Safari (4.0) / Linux, Safari (7.0) / iOS 7.0.2
✓ Agent completed: Safari (6.0.5) / Mac OS
✓ Agent completed: Chrome (30.0.1599.69) / Mac OS
✓ Agent completed: Firefox (24.0) / Mac OS
✓ Agent completed: Safari (4.0) / Android 2.3
✓ Agent completed: Safari (7.0) / iOS 7.0.2
✓ Agent completed: Safari (4.0) / Android 4
✓ Agent completed: Internet Explorer (9.0) / Windows 7
✓ Agent completed: Internet Explorer (10.0) / Windows 8
✓ Agent completed: Internet Explorer (8.0) / Windows XP
✓ Agent completed: Internet Explorer (7.0) / Windows XP
✓ Agent completed: Internet Explorer (6.0) / Windows XP
✓ 539 tests passed! (1 minutes, 14 seconds)