From 8d637fa4c1662d64a46dd2a88bd05f249c0559a6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=2E=20Rene=CC=81e=20Beach?= <splendidnoise@gmail.com>
Date: Mon, 18 Nov 2013 16:44:50 -0500
Subject: [PATCH] Issue #1994834: Changing main tabs in firefox and ie9 not
 working properly
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: J. Renée Beach <splendidnoise@gmail.com>
---
 js/navbar.js | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/js/navbar.js b/js/navbar.js
index f59d2bb..2ea6a84 100644
--- a/js/navbar.js
+++ b/js/navbar.js
@@ -240,10 +240,10 @@ Drupal.navbar = {
     defaults: {
       // The active navbar tab. All other tabs should be inactive under
       // normal circumstances. It will remain active across page loads. The
-      // active item is stored as a DOM element, not a jQuery set.
+      // active item is stored as an ID selector e.g. '#navbar-item--1'.
       activeTab: null,
-      // Represents whether a tray is open or not. Stored as a DOM element, not
-      // a jQuery set.
+      // Represents whether a tray is open or not. Stored as an ID selector e.g.
+      // '#navbar-item--1-tray'.
       activeTray: null,
       // Indicates whether the navbar is displayed in an oriented fashion,
       // either horizontal or vertical.
@@ -412,8 +412,9 @@ Drupal.navbar = {
       // activatable tab.
       if (event.target.hasAttribute('data-navbar-tray')) {
         var tab = this.model.get('activeTab');
+        var id = '#' + event.target.id;
         // Set the event target as the active item if it is not already.
-        this.model.set('activeTab', (!tab || event.target !== tab) ? event.target : null);
+        this.model.set('activeTab', (!tab || id !== tab) ? id : null);
 
         event.preventDefault();
         event.stopPropagation();
-- 
1.8.2

