Admin Toolbar doesn't properly add / remove the toolbar-drawer class when collapsing and expanding the drawer

in toolbar.js the Drupal.toolbar.collapse function adds the toolbar-drawer class.

The Drupal.toolbar.expand function also adds the toolbar-drawer class.

I believe the intention was to have the collapse function remove this class so that themers can have absolute positioning that moves with the expand/collapse of the toolbar.

I've attached a patch that fixes this problem.

CommentFileSizeAuthor
toolbar_drawer.patch711 bytesjames.elliott
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

David_Rothstein’s picture

Title: Admin Toolbar doesn't properly add / remove the toolbar-drawer class when collapsing and expanding the drawer » Toolbar doesn't properly add / remove the toolbar-drawer class when collapsing and expanding the drawer
Project: Admin » Drupal core
Version: 6.x-2.x-dev » 7.x-dev
Component: Code » toolbar.module
Priority: Minor » Normal
Status: Active » Needs review

Looks good on a quick glance... but this patch is for the D7 core toolbar module, right?

james.elliott’s picture

Yes, sorry for the incorrect tagging. It was my first bug report.

David_Rothstein’s picture

Status: Needs review » Reviewed & tested by the community

Happy first bug report!

I looked at the patch again and tried it out - it works and makes total sense. This should be ready to commit.

Dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to CVS HEAD. Thanks.

jbrown’s picture

I have often stared at that thinking it did not make sense...

See also #743338: Position of sticky table headers is not updated when shortcut bar is toggled

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.