Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It doesn’t help that some web frameworks make it difficult to preserve the open in new tab behaviour


What modern (last 10 years) web framework makes it difficult to have links be links?


NextJS complains if you don’t use their Link component, which in turn doesn’t allow open in new tab unless you nest a dummy <a> inside it. Because I think the Link uses onclick then if there is an immediate <a> child will set it up.


The <Link/> component is used for client-side page navigations in the same application. If you need to open links in a new tab with `target=“_blank”`, you should use the normal <a/> tag.


Yeah the one thing I love to do, because hey it is the web, is open navigations in a new tab. For example when banking see my transactions in one tab while making a payment in the second. I hate sites that break that. Banks like to do that presumably for security theatre. NextJS makes it easy to mess up but once you know the trick it is ok - they should probably add a console warning for it.


That's not what the parents are complaining about. It's when the user wants to open a regular link in a new tab using a key modifier.


This is working for me (just tested). Can you share one that isn’t please? I can investigate.


I just realized you work for Vercel, so how about I try to minimum reproduce then I can raise an Github issue?


That would be very helpful, thank you!


I have put a link to the issue in my HN profile. I think me providing the code will clear up the confusion as to what I think is a problem as we might all be talking about something different.


It has been fixed in the canary version already. Nice.

https://github.com/vercel/next.js/pull/36436


Hey Lee. I'm not saying it doesn't work :)

I'm just saying they are talking about something else.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: