#5295 closed bug (fixed)
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 (24)
Changed 13 years ago by
Attachment: | jquery.ui.button.patch added |
---|
comment:1 follow-up: 2 Changed 13 years ago by
Milestone: | 1.8 → 1.next |
---|
comment:2 Changed 13 years ago by
Replying to 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 13 years ago by
Attachment: | jquery.ui.button-02.patch added |
---|
remade patch to remove states on "disabled" directly
comment:3 Changed 13 years ago by
updated patch can be found at http://github.com/azatoth/jquery-ui/commit/3a282ebda4bef71275232dfb972ab30fd654a6e0
comment:5 Changed 12 years ago by
Milestone: | 1.next → 1.9 |
---|
This should be fixed by using the new ._hoverable() method being added to the base widget.
comment:6 Changed 12 years ago by
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.
comment:7 Changed 12 years ago by
Status: | new → open |
---|
If button can use ._hoverable(), that would solve this problem.
comment:8 Changed 12 years ago by
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.
comment:9 follow-up: 10 Changed 12 years ago by
commit to use _hoverable found here: https://github.com/cgack/jquery-ui/commit/bc7d98e3df3385b2b737171dc6207d0ac3cb57e4
comment:10 Changed 12 years ago by
Replying to 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.
comment:11 Changed 11 years ago by
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.
comment:12 Changed 11 years ago by
@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.
comment:13 follow-up: 14 Changed 11 years ago by
what was the problem with the patch submitted by cgack?
comment:14 Changed 11 years ago by
Replying to 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.
comment:15 Changed 11 years ago by
A workaround I use for this is the following:
buttonObject.button('disable').blur().removeClass('ui-state-hover');
comment:16 Changed 11 years ago by
Milestone: | 1.9.0 → 1.11.0 |
---|
comment:17 Changed 11 years ago by
Keywords: | haspatch added |
---|
this ticket has a pull request: https://github.com/jquery/jquery-ui/pull/562
comment:18 Changed 11 years ago by
Resolution: | → fixed |
---|---|
Status: | open → closed |
Button: use _hoverable for hover state management. Fixes #5295 - button doesn't remove hover state if they are disabled
Changeset: 8e1ceba717b85e42a13cc1660e7c8e9e9c26c384
comment:19 Changed 11 years ago by
Milestone: | 1.11.0 → 1.10.0 |
---|
comment:20 Changed 11 years ago by
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
comment:21 Changed 11 years ago by
Milestone: | 1.10.0 → 1.9.2 |
---|
A better fix would be to remove the classes when the button becomes disabled.