Index: toolbar.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/toolbar/toolbar.module,v
retrieving revision 1.5
diff -u -r1.5 toolbar.module
--- modules/toolbar/toolbar.module	14 Aug 2009 15:30:59 -0000	1.5
+++ modules/toolbar/toolbar.module	17 Aug 2009 08:51:00 -0000
@@ -129,17 +129,17 @@
 /**
  * Generate a links array from a menu tree array.
  *
- * Based on menu_navigation_links(). Adds in path based IDs, icon placeholders
- * and overlay classes for the links.
+ * Based on menu_navigation_links(). Adds in path based IDs including the menu
+ * item ID, icon placeholders and overlay classes for the links.
  */
 function toolbar_menu_navigation_links($tree) {
   $links = array();
   foreach ($tree as $item) {
     if (!$item['link']['hidden'] && $item['link']['access']) {
       $class = '';
-      // Make sure we have a path specific ID in place, so we can attach icons
-      // and behaviors to the items.
-      $id = str_replace(array('/', '<', '>'), array('-', '', ''), $item['link']['href']);
+      // Make sure we have a path specific ID including the menu item ID in
+      // place, so we can attach icons and behaviors to the items.
+      $id = str_replace(array('/', '<', '>'), array('-', '', ''), $item['link']['href']).'-'.$item['link']['mlid'];
 
       $link = $item['link']['localized_options'];
       $link['href'] = $item['link']['href'];

