Skip to main content

Search and Top Navigation

#5295 closed bug (fixed)

Opened March 05, 2010 03:27PM UTC

Closed November 12, 2012 02:19AM UTC

Last modified November 18, 2012 07:57PM UTC

buttons doesn't remove hover state if they are disabled

Reported by: AzaToth Owned by:
Priority: major Milestone: 1.9.2
Component: ui.button Version: 1.8rc3
Keywords: haspatch Cc:
Blocked by: Blocking:
Description

if hovering over a mouse and at the same time disable it, they hover state will not be removed. following patch fixes the issue by forcing removal even if diabled is set.

Attachments (2)
Change History (22)

Changed March 05, 2010 07:18PM UTC by scottgonzalez comment:1

milestone: 1.81.next

A better fix would be to remove the classes when the button becomes disabled.

Changed March 06, 2010 03:52PM UTC by AzaToth comment:2

Replying to [comment:1 scott.gonzalez]:

A better fix would be to remove the classes when the button becomes disabled.

Yea, that's an good idea, I've made an new patch to use that behavior.

Changed May 22, 2010 11:13PM UTC by AzaToth comment:3

Changed January 24, 2011 02:55PM UTC by scottgonzalez comment:4

#6808 is a duplicate of this ticket.

Changed January 24, 2011 02:55PM UTC by scottgonzalez comment:5

milestone: 1.next1.9

This should be fixed by using the new ._hoverable() method being added to the base widget.

Changed March 29, 2011 09:28PM UTC by fofanafi comment:6

Here is a test case--after the button is disabled, the mouse is still in the hover state, although I'm not clear on whether this is an issue.

http://jsbin.com/adika3/4

Changed March 29, 2011 09:43PM UTC by scottgonzalez comment:7

status: newopen

If button can use ._hoverable(), that would solve this problem.

Changed July 22, 2011 01:02PM UTC by BikingGlobetrotter comment:8

_comment0: I am using the second proposed patch, but it is not working as it should. \ \ In the following example [http://public.virtualmischa.de/bugs/jqueryui-button.html], you will see that after pressing "Play", "Stop" and "Play" the stop button is still in the hover state.1311339936921301
_comment1: I am using the second proposed patch, but it is not working as it should. \ \ In the following example [http://public.virtualmischa.de/bugs/jqueryui-button.html], you will see that after pressing "Play", "Stop" and "Play" the stop button is still in the hover state. \ \ I tested it with Google Chrome. \ Firefox is even worse, because it is not removing hovering state for the play button with has not been disabled at all.1311340526303679

I am using the second proposed patch, but it is not working as it should.

In the following example http://public.virtualmischa.de/bugs/jqueryui-button.html, you will see that after pressing "Play", "Stop" and "Play" the stop button is still in the hover state.

I tested it with Google Chrome.

Firefox is even worse, because it is not removing hovering state for the play button with has not been disabled at all.

Correction: Firefox stays in focus state not, not in hovering state. Sry for that

Changed September 14, 2011 12:24PM UTC by cgack comment:9

Changed November 03, 2011 12:47PM UTC by Narretz comment:10

Replying to [comment:9 cgack]:

commit to use _hoverable found here: https://github.com/cgack/jquery-ui/commit/bc7d98e3df3385b2b737171dc6207d0ac3cb57e4

Hi, can you please reupload the ptch for hoverable?

The link to your github depository is dead.

I have the same problem - actually it is also possible to make the disabled radio buttons "active" which shouldnt't happen.

Changed December 22, 2011 11:38AM UTC by gigi81 comment:11

I'm using 1.8.16 and encountered the same issue.

Here is a jsFiddle that shows it:

http://jsfiddle.net/gigi81/fav4R/3/

I don't understand why in 22 months the patch didn't make to the official stable release.

Changed December 22, 2011 01:03PM UTC by scottgonzalez comment:12

@gig81: In 22 months, nobody has provided a patch that does the right thing. The right thing is to use a general purpose solution across all widgets, which is what I've mentioned multiple times in this ticket.

Changed February 01, 2012 03:02PM UTC by jdomnitz comment:13

what was the problem with the patch submitted by cgack?

Changed February 01, 2012 03:10PM UTC by scottgonzalez comment:14

Replying to [comment:13 jdomnitz]:

what was the problem with the patch submitted by cgack?

Presumably the problem that Narretz said? cgack did submit a pull request 4 months later (after my comment), we just haven't gotten around to reviewing it yet.

Changed August 15, 2012 07:32PM UTC by gtr053 comment:15

A workaround I use for this is the following:

buttonObject.button('disable').blur().removeClass('ui-state-hover');

Changed October 11, 2012 02:43PM UTC by scottgonzalez comment:16

milestone: 1.9.01.11.0

Changed November 10, 2012 07:30PM UTC by mikesherov comment:17

keywords: → haspatch

this ticket has a pull request: https://github.com/jquery/jquery-ui/pull/562

Changed November 12, 2012 02:19AM UTC by Cory Gackenheimer comment:18

resolution: → fixed
status: openclosed

Button: use _hoverable for hover state management. Fixes #5295 - button doesn't remove hover state if they are disabled

Changeset: 8e1ceba717b85e42a13cc1660e7c8e9e9c26c384

Changed November 12, 2012 02:42AM UTC by scottgonzalez comment:19

milestone: 1.11.01.10.0

Changed November 13, 2012 04:07PM UTC by Cory Gackenheimer comment:20

Button: use _hoverable for hover state management. Fixes #5295 - button doesn't remove hover state if they are disabled

(cherry picked from commit 8e1ceba717b85e42a13cc1660e7c8e9e9c26c384)

Changeset: 85b5c5b5586af541291d52e5c52b9774e4ec2a22

Changed November 13, 2012 04:08PM UTC by scottgonzalez comment:21

milestone: 1.10.01.9.2

Changed November 18, 2012 07:57PM UTC by scottgonzalez comment:22

#8829 is a duplicate of this ticket.