This is probably Chrome's problem similar to this: http://drupal.org/node/744124

Basically one dropdown menu appears and then another (slightly offset) in front (see attached). This only happens if the page is long enough to have scroll bar and the page is scrolled all the way to the top.

SW: Google Chrome 8.0.552.237, MacOS 10.6.6

Comments

sun’s picture

Status: Active » Postponed (maintainer needs more info)

Is it possible that this only happens with Overlay?

Andrey Zakharov’s picture

Confirmed for Windows + Chrome
Appear with overlay, looks like overlay loads with its own instance of adminmenu bar.

adamdicarlo’s picture

Title: Duplicate dropdown menu Google Chrome on Mac OS » Duplicate admin menu dropdown when Overlay enabled -- easily seen in Google Chrome

I can reproduce this with Chrome 9.0.597.84 beta on Ubuntu.

Enabled:
* admin_menu
* admin_menu_toolbar
* overlay

Disabled:
* toolbar

Yes, the Overlay does bring another another admin_menu_toolbar instance with it. In Google Chrome, it's slightly offset, so it's easier to see it. But it's there on other browsers, too -- take a look at the source in Firebug.

With Chrome, activate the overlay, and then move your mouse horizontally back and forth pretty quickly over the admin menu toolbar area -- that pretty easily gets the "hidden" menu to drop down.

adamdicarlo’s picture

Version: 7.x-3.0-rc1 » 7.x-3.x-dev
Status: Postponed (maintainer needs more info) » Needs review
StatusFileSize
new1.62 KB

Here's a patch rolled off of HEAD.

It sends a variable to the JS called overlay_child; when it's true, the JS attaches behaviors but doesn't output markup (i.e. check the cache or do an AJAX request, I believe; I haven't studied the module much).

I'd tried aborting everything when we're an overlay child, but then the overlay doesn't get the marginTop behavior run, so it's too high up on the page. The question is, are too many behaviors being run in the overlay child document? (Does it matter?)

adamdicarlo’s picture

This issue seems like a release blocker to me. Maintainers?

adamdicarlo’s picture

Has anybody tried my patch?

tompagabor’s picture

i'm try this, and it's looks like good in Mac/Chrome.
i'm not an experienced developer, so i don't change status, but i think this patch fixed the problem.

Gábor

flibustier’s picture

patch working excellently, thanks. Chrome 11 + debian 6

star-szr’s picture

Edit: See post below.

star-szr’s picture

StatusFileSize
new1.64 KB

The patch itself gave me an error:

git apply -v admin_menu.1025846-4.patch
fatal: git diff header lacks filename information when removing 1 leading pathname components (line 5)

However applying the changes manually, the patch works for me. I've attached a version of the patch which applies cleanly.

adamdicarlo’s picture

Title: Duplicate admin menu dropdown when Overlay enabled -- easily seen in Google Chrome » [PATCH] Duplicate admin menu dropdown when Overlay enabled

@Cottser, yeah, my patch was rolled in the old `patch -p0 <` format, thanks for the reroll.

Wondering if the maintainers have looked at this issue at all... I'm not sure my patch is the "right" solution but I'd think it's good enough to commit at least for now.

Changing title to hopefully catch their attention.

flibustier’s picture

when i applying admin_menu.1025846-4.patch and after admin_menu-1025846-10.patch i see, that admin menu also dublicated on pages, where url of this pages has "...#overlay=..." parameter

adamdicarlo’s picture

@flibustier, could you give us a set of steps so we can reproduce the problem? To which version of Admin Menu are you applying the patch?

flibustier’s picture

version 7.x-3.0-rc1
when im installed module, i activate "Administration menu" checkbox and apply it in module list menu.
default admin panel has name "Toolbar" and i off them.
"Overlay" is on.
when i off "overlay" module all works fine, but i dont what do it.

DongIT’s picture

Patch works, thanks

mstrelan’s picture

Status: Needs review » Reviewed & tested by the community
tim.plunkett’s picture

I've only encountered this on one site, but the patch fixes it.

jstoller’s picture

The patch seems to be working for me.

danepowell’s picture

I found that the patch does help with just admin_menu enabled, but it doesn't help if you are using the "toolbar styles" submodule.

jeffschuler’s picture

The patch in #10 is working for me with the Toolbar Style submodule.
@Dane Powell: you sure?

danepowell’s picture

Yeah, I can still reproduce this with #10 and Toolbar Style enabled on a fresh D7.10 install. It happens mostly if you move the mouse very quickly onto a menu item.

pjcdawkins’s picture

The patch in #10 fixes this for me.

I did have the same problem as #21 / #23 before I cleared all caches.

danepowell’s picture

Weird... now the patch works fine with Toolbar Style enabled. Not really sure what to say... I definitely cleared caches the first two times I tried it, I'm not sure what's different now. Sorry for any confusion.

pjcdawkins’s picture

#25: there does seem to be an exception, when I edit and then save Views. But I don't want to use Overlay anyway so I won't be much help in testing this.

dimitriseng’s picture

Hi. Using admin menu 7.x-3.0-rc1, with Overlay enabled and Toolbar disabled. I was getting this issue on both Firefox and Chrome, but (I think) only on the default language which is not English, I was not getting this on the English language (translation).

The patch at #10 has fixed the problem for all cases I have tested so far. I have also tried this with Views to check the problem reported in #26 but this works ok for me.

danny englander’s picture

I cannot get the rerolled patch to apply from #10. I am not getting errors and I would have thought -v would have presented any to me. I used:
git apply -v admin_menu-1025846-10.patch
is there any other way to determine why the patch is not applying?

Sorry, my bad, the patch did apply ok, so now the duplication happens only with Administration menu Toolbar style enabled which is what I prefer for my editors.

adamdicarlo’s picture

@highrockmedia Did you turn off the core "Toolbar" module? If not, you'll have Toolbar and the Admin Menu Toolbar.

I just want to make sure we're talking about the same thing here.

danny englander’s picture

@adamdicarlo - yes of course the Core Toolbar had already been deactivated so I don't think that comes into play in my case.

sun’s picture

Status: Reviewed & tested by the community » Closed (duplicate)
+++ b/admin_menu.js
@@ -15,6 +15,7 @@ Drupal.behaviors.adminMenu = {
       suppress: false,
+      overlay_child: false,

The suppress setting already exists to suppress the admin_menu under certain conditions.

Given that, adding a separate, module-specific setting is not the right approach.

However, this entire issue duplicates #673662: Duplicate administration menu rendering in Overlay child, so let's merge our efforts in there.