We have custom tab for Media Browser that uses Ajax calls (drupal ajax). After each ajax call we got switched to Library tab. This happens because when we create tabs in media.browser.js

$('#media-browser-tabset').tabs({
      selected: activeTab, // jquery < 1.9
      active: activeTab, // jquery >= 1.9
      show: showFunc, // jquery ui < 1.8
      activate: showFunc // jquery ui >= 1.8
    });

we do not check if that has happened already.

Comments

ygerasimov’s picture

Status: Active » Needs review
StatusFileSize
new491 bytes

Attached patch adds once() that fixes the issue.

andypost’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: +Quickfix

Thanx, this is a great UI improvements

aaron’s picture

The test bot is down.

andypost’s picture

yep, that strange. js should not affect testing

andypost’s picture

@aaron Please commit this quick-fix

  • aaron committed 710e346 on 7.x-2.x
    Issue #2378973 by ygerasimov: fixed Ajax call switches to Libraries tab
    
aaron’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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