Search and Top Navigation
#9602 closed bug (fixed)
Opened October 15, 2013 08:56AM UTC
Closed April 21, 2014 01:15PM UTC
Last modified April 21, 2014 01:15PM UTC
Button: ui-state-active remains on disabled button
Reported by: | darek | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 1.11.0 |
Component: | ui.button | Version: | 1.10.3 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
If a button gets disabled during click it doesn't go into "disabled" state correctly and it has both "active" and "disabled" styles. Here's the demonstrated situation:
It is reproducible on the latest Chrome and Firefox. On IE9 it works a little bit better but it is also buggy.
Attachments (0)
Change History (7)
Changed October 15, 2013 12:13PM UTC by comment:1
resolution: | → notabug |
---|---|
status: | new → closed |
Changed October 15, 2013 12:32PM UTC by comment:2
My problem is also visible on jQueryUI 1.10.3 but not with the latest official css theme. The main problem is that button element gets two classes in my scenario: "ui-button-disabled" (which is right) and "ui-state-active" (which I believe is not right for disabled button). Here's the generated markup from your jsFiddle:
<button type="button" id="btn" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only ui-state-active ui-button-disabled ui-state-disabled" role="button" aria-disabled="true" disabled=""><span class="ui-button-text">Button</span></button>
I have my own CSS and I can mask the problem there, but shouldn't "ui-state-active" class be always removed for disabled button?
Changed October 15, 2013 12:49PM UTC by comment:3
resolution: | notabug |
---|---|
status: | closed → reopened |
summary: | Button doesn't remove active state when disabled and clicked → Button: ui-state-active remains on disabled button |
Ok, I see this now. The internal
mousedownhandler (that adds
ui-state-activeis running before the custom
blurevent. You can workaround this for now with a
setTimeout- http://jsfiddle.net/tj_vantoll/eyBmD/.
I suppose we should just blanket remove
ui-state-activewhen disabling a button. I can't think of a reason to ever leave it.
Changed October 15, 2013 12:51PM UTC by comment:4
status: | reopened → open |
---|
Changed December 12, 2013 04:58AM UTC by comment:5
_comment0: | \ > I suppose we should just blanket remove ui-state-active when disabling a button. I can't think of a reason to ever leave it. \ \ \\\\ \ I've submitted a pull request. https://github.com/jquery/jquery-ui/pull/1151 → 1386824680681027 |
---|
I suppose we should just blanket remove ui-state-active when disabling a button. I can't think of a reason to ever leave it.
\\\\
I've submitted a pull request and updated the testcase to use the fix branch.
Changed April 21, 2014 01:15PM UTC by comment:6
resolution: | → fixed |
---|---|
status: | open → closed |
Button: Remove ui-state-active
when disabling buttons
Fixes #9602
Closes gh-1151
Changeset: 23d7d50f374f71efec418276a343e947cb80aea6
Changed April 21, 2014 01:15PM UTC by comment:7
milestone: | none → 1.11.0 |
---|
Your test case is using a very old version of jQuery UI. This appears to be working fine in the latest version - http://jsfiddle.net/tj_vantoll/PeDqr/. If you can recreate the issue with 1.10.3 let us know.