Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Defaulting Y.ButtonCore's template to type=button (#973, #968) #1296

Closed
wants to merge 1 commit into from

Conversation

derek
Copy link
Contributor

@derek derek commented Oct 10, 2013

As issue #968 mentions, any Buttons rendered without a host/srcNode config option will default to type=submit. This is the correct behavior for any <button> element without a type attribute (spec), 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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant