comparison core/modules/toolbar/js/views/ToolbarVisualView.es6.js @ 5:12f9dff5fda9 tip

Update to Drupal core 8.7.1
author Chris Cannam
date Thu, 09 May 2019 15:34:47 +0100
parents a9cd425dd02b
children
comparison
equal deleted inserted replaced
4:a9cd425dd02b 5:12f9dff5fda9
143 * The event triggered. 143 * The event triggered.
144 */ 144 */
145 onTabClick(event) { 145 onTabClick(event) {
146 // If this tab has a tray associated with it, it is considered an 146 // If this tab has a tray associated with it, it is considered an
147 // activatable tab. 147 // activatable tab.
148 if (event.target.hasAttribute('data-toolbar-tray')) { 148 if (event.currentTarget.hasAttribute('data-toolbar-tray')) {
149 const activeTab = this.model.get('activeTab'); 149 const activeTab = this.model.get('activeTab');
150 const clickedTab = event.target; 150 const clickedTab = event.currentTarget;
151 151
152 // Set the event target as the active item if it is not already. 152 // Set the event target as the active item if it is not already.
153 this.model.set( 153 this.model.set(
154 'activeTab', 154 'activeTab',
155 !activeTab || clickedTab !== activeTab ? clickedTab : null, 155 !activeTab || clickedTab !== activeTab ? clickedTab : null,