The Foxy forums are on the move!

We're in the process of moving our forums over to a new system, and so these forums are now read-only.
If you have a question about your store in the meantime, please don't hesitate to reach out to us via email.

ctrl/cmd + click behavior in non-modal cart

joefranksjoefranks Member
in Bugs & Feature Requests edited January 2013
Hi guys, this is kind of a weird one, thought maybe someone else has run into this.

Setting up a site without a modal I have noticed that the command or control + click behavior doesn't trigger a new window with my view cart or add to cart buttons.

I don't have visible dev page to put this up on (I can pm you one if it helps), but if you look at this site from your case studies, it has the exact same behavior I am seeing on my dev site. Ctrl / cmd + clicking on the "checkout" or "shopping bag!" links in their header will open the page in the same window, where as any of the other links on the page will open in a new tab.

If you are on their hosted checkout or cart page the links behave correctly, only when cmd+clicking a link that takes you from the original domain -> the foxycart hosted page does it fail to open in a new tab.

However, middle mouse clicking behaves correctly, which is confusing.

I'm seeing in, FF Safari Chrome in both windows 7 and OSX

Commenting out foxycart.js seems to resolve it, so I would guess that something in the click handlers you are assigning is causing the change in the default browser behavior.

Anyway, thought it was interesting and would love to see if it was a resolvable issue.

Thanks! - joe

  • fc_adamfc_adam FoxyCart Team

    Huh - that is interesting. I don't think that has ever come up before! Thanks for the detailed post.

    We'll discuss this amongst the team - I think your guess is right, it's relating to a click handler we have on FoxyCart based domains.
  • sparkwebsparkweb Member, Integration Developer, FoxyShop, Order Desk
    edited January 2013
    Hi Joe, this is how I fixed this issue in the past:
    	$("#show-receipt-link").click(function() {$(this).attr("href"),'new_receipt_window') ;
    		return false;

    Obviously not a perfect fix, but gets a link opening in a new window if that's what's desired.
  • Thanks, I will consider that.

    I'm mostly just interested in it behaving correctly when using the cmd/ctrl + click shortcut. But not really a huge deal, I don't think that it is very common browsing behavior for most people.

    I'm pretty sure you can test for meta keys during the click event, so I would imagine it's doable, if I get around to figuring it out I'll post what I find.

Sign In or Register to comment.