Why doesn't command+click work correctly on Pinterest?
January 27, 2013 12:21 AM   Subscribe

Stop taking me to new tabs! Pinterest, why are you the only site that overrides my Firefox preferences?

So, yes, I agree that Pinterest is a satan whose power comes from elaborate manicures and bizarre casserole recipes, and it's been sent here to distract us from the real issues of the day. But it is driving me crazy for a different reason:

It's screwing with my tabs!

As per my Firefox preferences, in all other circumstances a cmd+click (on a Mac) opens a new tab but does not take me to that tab. This is what I like. But on Pinterest, this doesn't work when clicking on a particular pin and attempting to go to the image's original, source site — I do get taken to the new tab immediately. Like all of us, I take my tab hygiene incredibly seriously, and this is really driving me up a (perfectly decorated) wall.

Is there a stronger preference I can set somewhere? (Again, my FF preferences *are* set.) Is there a Firefox add-on or greasemonkey script I can use? Or maybe a Pinterest preference I don't know about?

I am so old my first draft of this question used the phrase "open apple+click." OPEN APPLE.
posted by Charity Garfein to Computers & Internet (6 answers total)
 
Don't know exactly. I can tell you that if you turn off JS then it works as expected.

Pintrest has JS on the page to rewrite the click URLs to first notify pintrest (so they can track exit links), then pintrest redirects you to the actual URL. I imagine somewhere in the JS click handling Firefox is forgetting your tab preferences and bringing the new tab to the front.

I'll bet it happens when they call event.preventDefault() for the anchor tag and then use window.open() later.

But the pintrest JS code is minimized, and I have a headache, so I'll let someone else figure out exactly what's going on :)
posted by sbutler at 3:28 AM on January 27, 2013


I had this problem with annoying javascript on Tumblr's "Like" pages (I don't actually use Tumblr, I just browse) and this Greasemonkey script fixed it. You might get some tips for finding the correct event in Firebug if you look at that script's source code.

Strangely, there are very few public Greasemonkey scripts for Pinterest, compared to sites of similar popularity.
posted by bcwinters at 6:10 AM on January 27, 2013 [1 favorite]


Happening to me in Windows too, but if I right click and tell it to open in a new tab, it does so in the background.
posted by QuakerMel at 7:22 AM on January 27, 2013


Consider reporting this bug to Pinterest.
posted by jeffamaphone at 9:08 AM on January 27, 2013


Code-wise, that's not really a "bug."

If the link is created by javascript (using window.location.href to load a new page), then those kind of commands won't work normally. They're really only for "normal" links - those wrapped in an [a href] tag.

Basically what sbutler said. This is thing that happens not infrequently, and one reason why it's nice for developers to just let browsers do their own thing and not try to reinvent the wheel.
posted by drjimmy11 at 9:42 AM on January 27, 2013


Using the Tumblr example, I've thrown together a real quick version for Pintrest. Works for me, but I haven't really spent time testing it well.

PintrestBackgroundClick.user.js
posted by sbutler at 9:12 PM on January 27, 2013


« Older My Step-Daughter's Father grad...   |  How do you quell irrational fe... Newer »
This thread is closed to new comments.