Closed (outdated)
Project:
DHTML Menu
Version:
6.x-2.x-dev
Component:
Javascript code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
20 May 2008 at 19:08 UTC
Updated:
30 Sep 2019 at 13:15 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
merlinofchaos commentedHmm, that's neat.
FYI this only happens after an AJAX request has been made by Views. My guess is that DHTML Menu has a problem with its behaviors code that causes it to fail when Views' behaviors are rerun.
Comment #2
cburschkaIs there any error console output? I'll test it shortly.
Comment #3
cburschkaThe behavior I have observed with the latest versions of Drupal 6, DHTML Menu and Views is that the menu is switched twice. It opens and closes, or closes and opens.
This indicates that the switchMenu() function is called twice. I shall investigate.
Comment #4
cburschkaDiagnosis: The response to the Views AJAX request causes Drupal.behaviors.dhtmlMenu() to be called again, adding listeners twice.
I have to take this to irc; Drupal's JS behaviors are beyond me.
Views is an essential module, though, so this bug isn't minor.
Comment #5
cburschkaUpdated.
Comment #6
cburschkaNobody's answering in IRC, but merlin's post hints that the behaviors are supposed to be re-run. This means I will set a flag to ensure the function cancels when it is called again.
Comment #7
cburschkaI'm declaring a script-scope variable named dhtmlRun and checking it in the behaviors function. If it's true, the function returns, otherwise it is set to true.
This fixes the problem; AJAX requests in Views now no longer break DHTML Menu.
Comment #8
cburschkaCommitted to HEAD.
Comment #9
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #10
colinjones commentedThis exact same behaviour appears when Ajax editablefields are exposed whilst viewing a node (nothing to do with Views). The DHTML menus open/close or close/open... also the top submenu entry in the menu you are trying to expand starts getting duplicated - I have ended up with 4 copies of the parent menu's home page submenu entry. When I turn off the option that creates a submenu entry for the parent menu entry's page, it simply duplicates the next submenu entry along...
Comment #11
colinjones commentedJust noticed that the submenu entry representing the parent menu (enabled by an option in DHTML Menu) duplicates even when you sort a Views view using AJAX clickable column headings. As soon as you turn off AJAX the behaviour goes away.
Comment #12
marcoka commentedfor you information, this patch woks, but it is not jet in the d7 branch. so in the d7 version you will have exactly that problem.
Comment #13
marcoka commentedfix for d7 here: http://drupal.org/node/1178226
Comment #14
vuilI closed the issue as Closed (outdated) because it is for unsupported 6.x version of Drupal.