summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwebchick2014-02-06 22:48:13 -0800
committerwebchick2014-02-06 22:48:13 -0800
commit761632e2580afd12926f8cb4ef63fd0503e94b0e (patch)
tree91548fb12b94988d9c20e0bfa603fd2b8bf97819
parent6b0756e2aa9018b9d5a8901da3656b9bf535cfb2 (diff)
Issue #2181525 by Dragan Eror, maggo, nod_ | dexterns88: Toolbar toogle button bug with click.
-rw-r--r--core/modules/toolbar/js/views/ToolbarVisualView.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/core/modules/toolbar/js/views/ToolbarVisualView.js b/core/modules/toolbar/js/views/ToolbarVisualView.js
index 10c762d..3cfa703 100644
--- a/core/modules/toolbar/js/views/ToolbarVisualView.js
+++ b/core/modules/toolbar/js/views/ToolbarVisualView.js
@@ -77,10 +77,11 @@
// If this tab has a tray associated with it, it is considered an
// activatable tab.
if (event.target.hasAttribute('data-toolbar-tray')) {
- var tab = this.model.get('activeTab');
- var id = '#' + event.target.id;
+ var activeTab = this.model.get('activeTab');
+ var clickedTab = event.target;
+
// Set the event target as the active item if it is not already.
- this.model.set('activeTab', (!tab || id !== tab) ? id : null);
+ this.model.set('activeTab', (!activeTab || clickedTab !== activeTab) ? clickedTab : null);
event.preventDefault();
event.stopPropagation();