Search and Top Navigation
#7804 closed bug (duplicate)
Opened October 20, 2011 04:17PM UTC
Closed November 21, 2011 01:30PM UTC
Last modified November 21, 2011 01:30PM UTC
Button Widget state gets out of sync when used with a checkbox
| Reported by: | jamesc | Owned by: | |
|---|---|---|---|
| Priority: | minor | Milestone: | 1.9.0 |
| Component: | ui.button | Version: | 1.8.16 |
| Keywords: | Cc: | ||
| Blocked by: | Blocking: |
Description
As per the example in:
http://jsbin.com/uzikat/16/edit
Clicking more than once in quick succession will demonstrate the issue.
Issue appears to only exist in firefox, tested on FF7, IE and Chrome.
When double-clicking, or performing other rapid clicks, the visual state can get out of sync with the checkbox state. This looks to be because of a stray toggleClass. Made an attempted fix, don't have git/etc set up here, patch against stock 1.8.16 is below:
--- jquery.ui.button.js 2011-08-18 18:39:36.000000000 +0100
+++ jquery.ui.button.patched..js 2011-10-20 16:54:57.356507200 +0100
@@ -144,7 +144,6 @@
if ( options.disabled || clickDragged ) {
return false;
}
- $( this ).toggleClass( "ui-state-active" );
self.buttonElement.attr( "aria-pressed", self.element[0].checked );
});
} else if ( this.type === "radio" ) {