Opened 13 years ago
Closed 8 years ago
#3412 closed defect (bug) (fixed)
Clicking "Favorite" fast multiple times makes it go crazy and disappear!
Reported by: | InterMike | Owned by: | boonebgorges |
---|---|---|---|
Milestone: | 2.7 | Priority: | trivial |
Severity: | trivial | Version: | |
Component: | Activity | Keywords: | has-patch |
Cc: | alexander.berthelsen@… |
Description
I clicked on "Favorite" about 20 times extremely fast, and it drove the My Favorites (#) way up. The only way to get rid of the extra Favorites is to click on "Remove Favorite" and to reload the page. (I still have have 1 Favorite that won't go away.)
Also, eventually, the Favorite button got dimmer, and dimmer, until completely disappearing altogether! LOL
Attachments (1)
Change History (12)
#2
@
13 years ago
In the part of DTheme js near "Stream event delegation", the line beginning "target.fadeOut" in the callback can be amended like so to stop animations stacking:
target.stop(true, true).fadeOut( …
Not sure if it's a worthwhile change as in theory we'd ought to have do something similar on all other buttons that have a fadeOut.
#3
@
13 years ago
- Keywords needs-patch added; close removed
- Milestone changed from Awaiting Review to 1.5
- Version 1.5 deleted
Confirmed. The JS should check for the existence of the loading class before proceeding.
#4
@
13 years ago
- Priority changed from normal to trivial
- Severity changed from normal to trivial
I still say this is an edge case, and this ticket can be punted if no patch is readily available. I am not keen on going through all of the bp-default js at this point in the cycle and converting animations to callbacks.
#7
@
13 years ago
Punting to Future Release, pending a patch. (If it's going to require rewriting all of bp-default's JS, maybe we should mark wontfix)
#9
@
8 years ago
- Cc alexander.berthelsen@… added
- Keywords has-patch added; needs-patch removed
This is still a problem with latest BP (running 2016). The only real problem is with the favouriting "button" where as reported the count for "my favourites" goes crazy and BP makes loads of unnecessary requests to admin-ajax.php if someone clicks repeatedly on favourite. Attached is a super simple patch which just checks for the class "loading" and bails if that is set, works great as far as I can tell! :)
I'm able to reproduce this only if I click really, really fast.
This ticket combines two separate issues. The first is that fast button clicks make the button disappear. I don't know how to fix that; maybe by disabling the button until a response is received? I tried doing this, but because it's a link and not a true button, I wasn't able to make it work quite right.
The second issue is that the logic for the Favorites count is off. This is just because the number in the tab is incremented when you click, on the client side - it does not query for a new, updated Favorites count.
I'm tempted to say wontfix in both cases, as they're both such edge cases and are harmless anyway.