Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#9584 closed bug (fixed)

Tabs: Refresh issue when tabs are moved to bottom

Reported by: SledgehammerPL Owned by: SledgehammerPL
Priority: minor Milestone: 1.10.4
Component: ui.tabs Version: 1.10.3
Keywords: Cc:
Blocked by: Blocking:

Description

Browsers: IE and Chrome (other not tested)

OS: XP, Win8 (other not tested)

How to reproduce bug:

It's hard to me to show it on jsFiddle, because the problem is with ajax loaded content.

The base is here : http://jsfiddle.net/Sledgehammer/hCdRy/9/

The idea of the problem: tab-index.html contains only this:

<ul>
  <li><a href="deny.html">FOOBAR</a></li>
</ul>
    <span style="cursor:pointer" onclick="$.addTab();">PRESS HERE TO ADD TAB</span>

After loading page almost looks ok. But firing addTab() by clicking PRESS HERE TO ADD TAB should just add new Tab. But it makes strange new Tab (without) borders, and changes <li> FOOBAR</li> from first tab into a new tablist and new tab

if you want, you can see the problem here: http://www.kredyty.brzezina.pl/debug/

Change History (9)

comment:1 Changed 9 years ago by Scott González

Owner: set to SledgehammerPL
Status: newpending

There's no reason that you need to use ajax to show whatever bug you're describing. Just inject the markup directly. You should be able to reduce this quite a bit.

comment:2 in reply to:  1 ; Changed 9 years ago by SledgehammerPL

Status: pendingnew

Replying to scott.gonzalez:

There's no reason that you need to use ajax to show whatever bug you're describing. Just inject the markup directly. You should be able to reduce this quite a bit.

  1. yes, you're right, I reduced two functions not connected to the problem.
  2. I'm not sure what you mean "inject the markup".

comment:3 in reply to:  2 ; Changed 9 years ago by tj.vantoll

Status: newpending

Replying to SledgehammerPL:

  1. I'm not sure what you mean "inject the markup".

Don't rely on remote files, for example - http://jsfiddle.net/tj_vantoll/ZjgbK/

comment:4 in reply to:  3 Changed 9 years ago by SledgehammerPL

Status: pendingnew

Replying to tj.vantoll:

Replying to SledgehammerPL:

  1. I'm not sure what you mean "inject the markup".

Don't rely on remote files, for example - http://jsfiddle.net/tj_vantoll/ZjgbK/

Ok, this is not exactly the same, but let's try to fix this

http://jsfiddle.net/Sledgehammer/hCdRy/14/

Expected result is simply add new tab and when clicked on new tab -> shows new content loaded from external link

But unexpectedly previous content (contained <li> tags) is lost... And press RIGHT TAB 1 after adding NEW TAB - it contains another tablist

Last edited 9 years ago by SledgehammerPL (previous) (diff)

comment:5 Changed 9 years ago by tj.vantoll

Status: newopen
Summary: Jquery Tabs creates unwanted tabs from external contentsTabs: Refresh issue when tabs are moved to bottom

Here's a reduced test case - http://jsfiddle.net/tj_vantoll/maC8B/. Something about the <ul><li><a href> structure on the other tab is throwing this off.

The tabs also have to be on the bottom for this issue to happen as well. I'll have to dig into this more before determining if this is something we should support, but it seems like a legit problem so I'll mark it valid for now.

comment:6 Changed 9 years ago by Scott González

Resolution: fixed
Status: openclosed

Tabs: Keep reference to existing tablist during refresh. Fixes #9584 - Tabs: Refresh issue when tabs are moved to bottom.

Changeset: e14f75ed480e5b036bb47ab3398d1e0df28a128a

comment:7 Changed 9 years ago by Scott González

Milestone: none1.11.0

comment:8 Changed 9 years ago by Scott González

Tabs: Keep reference to existing tablist during refresh. Fixes #9584 - Tabs: Refresh issue when tabs are moved to bottom. (cherry picked from commit e14f75ed480e5b036bb47ab3398d1e0df28a128a)

Changeset: 8eefd2032fb5c0e60c7a9899ba51bc7f33aaebc8

comment:9 Changed 9 years ago by Scott González

Milestone: 1.11.01.10.4
Note: See TracTickets for help on using tickets.