Fool-proof link buttons from button methods #3282

toddparker opened this Issue Dec 15, 2011 · 1 comment


None yet

2 participants


We make it very clear in the docs that link based buttons just use buttonMarkup to apply the look of buttons, but that none of the button plugin methods are to be used with link buttons. However, we still get a ton of bug reports where people ask why their buttons get huge when they call the disable method on it. The cause is that the button plugin will wrap the existing link button markup so you have a button inside a button.

We don't think that allowing links to be disabled is a good idea because the links will still work in grade C experiences and links don't have a disabled option in HTML. If a developer wants to disable a link button, it's easy enough to add the ui-disabled class and prevent any event interactions on it, but I dont' think we need to encourage this use case.

I do think we should make this a bit more fool-proof by adding a simple check in the button plugin to first see if it is being called on a link and, if so, do nothing to prevent the double wrap issue from happening.

@gseguin gseguin was assigned Feb 16, 2012
jQuery Foundation member

Fixed by aae9205

@gseguin gseguin closed this Feb 16, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment