When clicking the Apply button to search for specific videos, it switches to the Upload tab when the results are loaded. I have to manually click the YouTube tab to see the results.

This might confuse users until they realize how it works. However, it should really stay on the YouTube tab.

When submitting the form through one of the buttons: Apply, Next or Previous the page is refreshed without adding the correct fragment. In this case '#media-tab-youtube'.

See #5 for steps to reproduce.

XREF : Part of this issue depends on media #1802026-6: Ajax callbacks in the media overlay cause the active tab to switch tab unexpectedly

Files: 

Comments

Similar thing happens in this issue #1593624: YouTube tab: Next Link doesn't work correctly

Title:When searching it does not retain tab when loading resultYouTube Tab: When searching it does not retain tab when loading result

The cause for this issue and #1593624: YouTube tab: Next Link doesn't work correctly is that the media browser or more specific jQuery UI tab does not get the fragment #media-youtube

Testing this with
http://example.com/media/browser?render=media-popup#media-tab-youtube
selects the correct tab. Make sure you refresh the page when editing the fragment into ie. media/browser?render=media-popup#media-tab-media_internet

So we need to fix this either through media_youtube or media module to add the fragment. jQuery UI Tabs then uses this.

Title:YouTube Tab: When searching it does not retain tab when loading resultYouTube Tab: When apply searching, next or previous button it does not retain tab when loading result

Status:Active» Needs work
StatusFileSize
new706 bytes

This patch will fix the issue with the next/previous links. I still need to address the search button itself.

Status:Needs work» Active

@aaron nice.

For the Search Button we probably need media to fix for that iframe fragment in line with

(http://stackoverflow.com/questions/4299435/remember-which-tab-was-active...)

<?php
# javascript
$(".tabs").tabs({
   
select: function(event, ui) {
      
window.location.hash = ui.tab.hash;
    },
});
?>

But this is more a solution for the container aka media module

using the setter (and getter?) like (http://api.jqueryui.com/tabs/#option-active)

<?php
#javascript
// getter
var collapsible = $( ".selector" ).tabs( "option", "collapsible" );
// setter
$( ".selector" ).tabs( "option", "collapsible", true );
?>

(hope this helps)

Thanks @aaron and @clemens.tolboom. The patch in #7 works, but it also makes the page jump to the top of the media browser dialog each time you click on next or previous links. I'm not sure if there is a way around that. It's still an improvement.

I added my media related comment from #8 to #1802026-5: Ajax callbacks in the media overlay cause the active tab to switch tab unexpectedly.

@gmclelland what do you mean by 'jumps to the top'. Is the dialog not high enough? Please search for a bug report in media or media_youtube or create a new one :-)

StatusFileSize
new518.73 KB
new391.32 KB

@clemens.tolboom - See the screenshots for an example of how the dialog jumps.

The first screenshot shows before I click "next"
The second screenshot shows the after. Notice how the media browser is at the top of the page?

Hope that helps illustrate what I'm talking about.

Issue summary:View changes

Added comment #5 partly

Status:Active» Needs review

I think I fixed the Apply problem in media: #1802026-6: Ajax callbacks in the media overlay cause the active tab to switch tab unexpectedly

So this is now only about Next & Previous and only needs a review.

@gmclelland please check the issue queue(s) for your bug which is probably media.module related.

Status:Needs review» Reviewed & tested by the community

Status:Reviewed & tested by the community» Needs work

I can still reproduce the tab-switching with the 2.0-alpha1 media release and the patch mentioned in this issue: Searching for youtube-videos jumps to the upload tab …

I still reproduce this next/previous problem with Media 2.0-alpha2/Youtube 2.0-rc3 releases. The patch applied for Media 7.x-2.0 in comment 31 for #1802026: Ajax callbacks in the media overlay cause the active tab to switch tab unexpectedly does eliminate the tab from changing if the apply button is clicked.

Issue summary:View changes

Updated issue summary.