jquery/jquery-mobile — Issue #3282: Fool-proof link buttons from button methods
Author: toddparker
Created: 2011-12-15 23:05:48+00:00
State: open

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.