When switching between pages in the overlay the shortcut-add-remove-link and tabs are visible while loading the new page.

Solution is simple: remove shortcut-add-remove-link and tabs in Drupal.overlay.load instead of Drupal.overlay.bindChild

Comments

casey’s picture

Status: Active » Needs review
StatusFileSize
new1.66 KB
dries’s picture

Not sure I fully understand this bug report, or how to reproduce it. Care to elaborate?

casey’s picture

StatusFileSize
new1.67 KB

Patch doesn't apply any more.

Example:
- open "Content" from toolbar (has shortcut-add-remove-link and tabs) and wait till loaded
- open another, e.g. "Structure"
- during "Loading..." you still see the shortcut-add-remove-link and tabs from "Content"

aspilicious’s picture

Status: Needs review » Reviewed & tested by the community

Ok works in every browser.
Looked at the code, it's just some lines moved around.
Making this RTBC.

Bojhan’s picture

Ahh, yup! This has always annoyed me. Its like leaving old stuff on the screen for just a bit.

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Hm. Another question is why is there shortcut module code in overlay's js to begin with? But I've committed this patch to HEAD, since I can confirm that it solves the bug, and is indeed just moving code around.

casey’s picture

Status: Fixed » Needs review
StatusFileSize
new1.17 KB

If the clicked link is one of the tabs, we shouldn't remove those tabs as they are going to re-appear.

Patch is dependant on the one in #683128: Multiple 'add to shortcut' links appearing when adding fields; that one should go in first!

aspilicious’s picture

At first sight this looks good (cause it was my idea :p).
But im gonna let it review by other people.

aspilicious’s picture

Hmm maybe i see another improvement. If you click on a tab, then it starts loading and after that it becomes your "primary" tab. I think it's better if it becomes your primary tab when it starts loading. I tried to copy some code as proof of concept but it didn't worked.

Maybe someone else can do this?

casey’s picture

StatusFileSize
new1.7 KB

Whatever you wish :)

What this patch is doing is easily tested when switching between tabs on "Content" (admin/content) in toolbar.

aspilicious’s picture

:) good work!

casey’s picture

This is a ux improvement and ready to go in. plz review.

Bojhan’s picture

Status: Needs review » Reviewed & tested by the community

It worked here, a nice detail.

dries’s picture

Status: Reviewed & tested by the community » Fixed

Nice improvement. Committed to CVS HEAD.

dries’s picture

Status: Fixed » Needs review

I'm going to re-open this because it seems to introduce inconsistent behavior. If you click on a sub-tab, the tabs will disappear. In other words, we now have a situation where tabs can disappear but not always.

aspilicious’s picture

StatusFileSize
new245.27 KB
new190.19 KB

Im gonna help this issue with some proper test results.
I attached two screenshots, one is failing, one isn't.
I filtered the cause.

The tabs only stay with a secondary menu, when you click on the first menu item.
In case of my screenshot that is "Global settings"

Hopefully you can use this info!

aspilicious’s picture

EDITED: forget the past, look at next post

aspilicious’s picture

StatusFileSize
new1.76 KB

This works on my localhost.
I need a code review as this is my first javascript/jquery patch!

aspilicious’s picture

StatusFileSize
new1.76 KB

Wrong patch, damnit

aspilicious’s picture

StatusFileSize
new2 KB

Maybe this own is better.
In this one the active secondary tab switches faster.

Bad side: labels secondary tabs jumping a bit due to changing active style

casey’s picture

StatusFileSize
new3.28 KB

Changes mainly to prevent doing too much.

aspilicious’s picture

Thnx casey for reviewing it and making it better...

Hmm are those secondary tabs also jumping a lot on your computer:

1) click on a secondary tab
2) the clicked tab becomes the active one
3) look at the padding before it gets reloaded (you have to be quick ;) )
4) After the page is loaded the right-padding in the active tab is larger.

But this isn't realy related to this issue,

seutje’s picture

seems to work as expected, don't even get the inconsistent padding mentioned in #23

aspilicious’s picture

Status: Needs review » Reviewed & tested by the community

Ok marking this RTBC

casey’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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