Needs work
Project:
DHTML Menu
Version:
7.x-1.x-dev
Component:
CSS code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
3 Jun 2011 at 21:31 UTC
Updated:
8 Oct 2019 at 07:28 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
marcoka commentedattached patch should solve that
Comment #2
marcoka commentedComment #3
ahwebd commentedThanks e-anima
Patch working for me
Comment #4
jefkin commentedI discovered this problem in parallel by having an ajax loading bit on a page with a dhtml menu. in addition to the multiple passes causing bouncy menus, the menus I had the cloned menu item apearing 2, 3, 5 times depending on how many ajax calls happened. D:
So I searched here and found this issue, but I have a serious doubt about this patch. I mean, doesn't this patch avoid using the the drupal 7 behaviors update?
instead of:
why not use:
and then change your calls like:
with the recommended style:
Though, I typically don't use in line functions, and instead define new functions (even if relatively simple), as in:
So then your attach code is cleaner looking (instead of the above...):
Either with or without defined functions, just using context and .once() in addition to being part of the best practices, will also make sure that you won't re-run your js over the same section ever -- no matter how many ajax calls you load., and you offer the possibility of having ajax added dhtml menus. Although it's perhaps too complicated a system for *that* to work out of the box.
Comment #5
michaelfavia commented@jefkin agree with this method as well. any chance we could squeeze a patch out of you to make it happen? Id be happy to commit it post haste after a review.
Comment #6
jefkin commented@michaelfavia, well quick patch squeezed out. I've tested in all the ways that I use it, (clone). But we should have people checking that use other ways.
Comment #7
jefkin commentedwithout the debugging drivel I left in the top on #6 :-/
Comment #8
michaelfavia commentedQuite a patch there ;) I'll do my best to review it tonight or tomorrow and depending on that get it added to the dev branch with proper attribution to you. Thank you!
Comment #9
jefkin commented@michaelfavia
I forgot a last minute change I added two weeks ago.
Uhh :-/ , after a bit of testing my team found a few minor flaws, and one semi-serious one in the patch I last sent.
I'm attaching the specific spot changes based on the #7 patch: "1178226-drupal-standards-behavior-2.patch" to fix it, as well as a full patch from head: "1178226-drupal-standards-behavior-full.patch".
I'm happy to let you know that this newest version is being used in a production site now for 2 weeks without a problem :D
Comment #10
dmegatool commentedThx for the path ! Works here too :)
Comment #11
jonloh commentedthe latest patch in #9 solves the problem. Just that the patch doesn't work quite well due to some issue in the file itself. Hence, you will need to patch it manually.
Apart from that, it works great ;) Thanks!
Comment #12
Dentorat commentedAs mentioned, it has to be patched manually, but I'm getting pretty confused trying to do this, can anyone provide a copy of the fully patched file?
Thanks
Comment #13
Anonymous (not verified) commentedReporting successfully applying this patch to 7.x-1.0-beta1. Extra cloned items no longer appear after a views ajax filter action.
Would it be possible to get this merged to the next release version?
Many thanks!
Comment #14
vuilPlease the patch needs re-roll... I set the issue to Needs work.
Comment #15
vuilAdd Needs reroll in Issue tags.
Comment #16
vuilI also unassigned the issue of @michaelfavia.