#5 ✓hold
Ryan Johnson

Fix for Control.Tabs + Safari + uri encoded urls

Reported by Ryan Johnson | June 13th, 2008 @ 11:36 AM | in 1.0

First of all, thanks for Tabs. It is a great little library, that

really makes working with tabs clean.

Having said that, we have got a slight issue with tabs, and complex

generated urls. In particular there were problems with uri encoded

urls containing %20, killing the autodetection of the links.

I was able to update the behavior, by changing the line:

return (/^#/).exec(link.href.replace(window.location.href.split('#')

[0],''));

to read:

return (/^#/).exec(link.href.replace(link.href.split('#')[0],''));

I believe that this keeps the intention the same, and might be worth

patching back into the main version.

Comments and changes to this ticket

  • Suneth Mendis

    Suneth Mendis June 15th, 2008 @ 02:12 PM

    hey!

    I did think about what you said earlier on google discussion thread. Does link need to have the

    full url at all? In fact the line I changed ( return (/

    ^#/).exec(link.href.replace(window.location.href.split('#')

    [0],'')); ) is actually stripping the rest of the url before the #. So

    if the link does not have the full url, better still isn't it?

    Cheers,

    Suneth

  • Ryan Johnson

    Ryan Johnson September 9th, 2008 @ 11:59 AM

    • State changed from “unconfirmed” to “hold”
    • Tag set to control.tabs

    Suneth, I've checked in another patch which dealt specifically with webkit, can you check out the latest version and see if it solves your problems?

  • Trey Matteson

    Trey Matteson October 15th, 2008 @ 01:04 PM

    I hit this same problem, and the fix that is on the latest revision did not help at all. I am using this line successfully:

    return (/^#/).exec((Prototype.Browser.WebKit ? decodeURIComponent(link.href) : link.href).replace(/.*(#.*)/, "$1"));
    
    

    If the intent is to just cut the link's href down to the anchor piece, why mess with the page's url at all? Maybe there are useful cases where they would be different that I am not thinking of.

  • Ryan Johnson

    Ryan Johnson October 22nd, 2008 @ 03:22 PM

    Think I found the problem. When the URL contains "%23" window.location is undefined in safari. Trey, your fix solves the problem, thanks.

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

NOTE: Please do not open tickets here. If you have an issue, please open it on http://github.com/syntacticx/livepipe-ui/issues/

High quality widgets and controls for web 2.0 applications built using the Prototype JavaScript Framework. Each control is well tested, highly extensible, fully documented and degrades gracefully for non JavaScript enabled browsers where possible. MIT licensed and actively maintained.

Pages