Skip to main content

Search and Top Navigation

#5604 closed bug (duplicate)

Opened May 11, 2010 11:15AM UTC

Closed February 11, 2011 01:21PM UTC

Last modified October 11, 2012 09:15PM UTC

Button: ui-state- class names not going away

Reported by: cwolgast Owned by:
Priority: minor Milestone:
Component: ui.button Version: 1.8.1
Keywords: button Cc:
Blocked by: Blocking:
Description

When having a button fire a function of various kinds the classes ui-state-focus and ui-state-hover will be "locked" in the button. At least two use case scenarios I've managed to find (that are easily reproducable) can be found at:

http://crowded.se/test/e.php (when opening a dialog)

http://crowded.se/test/f.php (when disabling/enabling a button)

Attachments (0)
Change History (5)

Changed May 11, 2010 11:18AM UTC by rdworth comment:1

summary: Interaction class names not going awayButton: ui-state- class names not going away

Changed August 31, 2010 01:31PM UTC by robot comment:2

I have also experienced this issue. After some investigation, I found that the reason for this bug is that the button widget doesn't always get notified about events which might affect its state.

It's possible to fix the 2 examples given by cwolgast using the following 2 solutions:

For the dialog:

Insert the following line of code to the file jquery.ui.dialog.js

-on line 205 (the second next line after "''

self.element.attr('title', self.originalTitle);
''")

and

-on line 249 (the second next line after "''

$.ui.dialog.maxZ = maxZ;
''")

    $('.ui-state-focus').each (function (){ $(this).trigger ('blur') });

For the button:

Insert the following line of code to the file jquery.ui.button.js

-on line 236 (the next line after "''

this.element.attr( "disabled", true );
''")

    $(this.element).trigger ('blur').removeClass ('ui-state-hover');

''(Tested this with jquery 1.8.4 on Firefox 3.6.8 / Linux)''

Changed August 31, 2010 01:33PM UTC by robot comment:3

Oh, I meant jquery-ui 1.8.4

Changed February 11, 2011 01:21PM UTC by scottgonzalez comment:4

resolution: → duplicate
status: newclosed

This is a duplicate of #5265 (dialog) and #5295 (disable).

Changed October 11, 2012 09:15PM UTC by scottgonzalez comment:5

milestone: TBD

Milestone TBD deleted