It is a simple line of code and the entire site does this or add target="_blank" to every hyperlink, and it will do the same thing. It sucks that you have to right-click every link to open in a new tab or window and it is such a simple fix.

top 50 comments

sorted by: hot top controversial new old
[–] 69 points 2 years ago (4 children)

I prefer the current behaviour.

It's easy to open a link in a new tab without right clicking. You can middle click (Windows and Linux) or command+click (MacOS). However there's no easy way to force a browser to open a link in the current tab if the site wants to use a new tab.

  • source
  • hideshow 8 child comments
  • [–] 38 points 2 years ago (1 child)

    What I hate is when you click on what’s supposed to be an image that you’d expect to expand, but instead it’s a link because the embed isn’t supported. Then when you hit back you lose your place because the page your on isn’t saved and you’ve lost your place trying to get back.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 3 points 2 years ago

    I made this user style to help fix that problem by outlining images, and also make it so when you click an image it expands over the page at full size up to the width of the screen.

    Though it's not perfect. If the image is already black it's hard to tell. You could change the outline color to something less common, but that looks ugly. Changing the boundary radius would probably be the best, but it's already marked as !important so I don't think I can change it. I'm open to suggestions on improving that part.

  • source
  • parent
  • [–] 24 points 2 years ago

    I was almost beginning to think I was browsing the whole web wrong by middle-click-opening a bunch of tabs, then going through them all after I've seen all the interesting headlines.

  • source
  • parent
  • [–] 1 point 2 years ago

    However there’s no easy way to force a browser to open a link in the current tab if the site wants to use a new tab.

    Just hit ctrl+w after clicking the link. That will close the current tab.

  • source
  • parent
  • [–] 56 points 2 years ago (24 children)

    You can use middle click to open sites in a different tab

  • source
  • hideshow 26 child comments
  • [–] 4 points 2 years ago

    I'm aware of this and do this but its annoying when it could just open a new link away from Lemmy because so much of being on a lemmy instance for some reason involves me keeping Lemmy in one tab so I stay logged in... because if I leave... then I have to sign back in again.

  • source
  • parent
  • load more comments (22 replies)
    [–] 48 points 2 years ago (2 children)

    Web apps should not override the configured behavior of browsers.

  • source
  • hideshow 3 child comments
  • [–] 2 points 2 years ago (1 child)

    It does not. There is nothing on lemmy's link to force link to open in the same tab. Your browser can do whatever it wants.

    Maybe your confusing the behavior that a lot of site decided to implement as default (open in new tab) with a browser setting.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 4 points 2 years ago (1 child)

    Maybe your confusing the behavior that a lot of site decided to implement as default (open in new tab) with a browser setting.

    Try reading OP's title and post body, then my reply again.

  • source
  • parent
  • hideshow 2 child comments
  • load more comments (1 reply)
    [+] 32 points 2 years ago* (last edited 2 years ago)
    [–] 31 points 2 years ago (1 child)

    Yeah, but no: blind and visually impaired people have troubles navigating the web because of these links that are opened in a new tab/window.

    It could be an option to activate, though.

  • source
  • hideshow 2 child comments
  • [–] 29 points 2 years ago (3 children)

    If you can, contribute to the code. You can do a pull request if you want.

  • source
  • hideshow 4 child comments
  • [–] 32 points 2 years ago*

    There might even be discussions on it which you can vote on.

    Eventually it would be nice to have a toggle in the settings. Could keep the current behavior as the default and let users change it

  • source
  • parent
  • load more comments (2 replies)
    [+] 28 points 2 years ago* (last edited 2 years ago) (3 children)
  • [–] 3 points 2 years ago

    I don't really agree with this, though. I'm all about control or what have you, but I don't feel that I'm in less control if I cannot leave Lemmy when clicking a link. I can't see any flow where this is expected behavior other than the principle of not setting a target.

  • source
  • parent
  • load more comments (1 reply)
    [–] 17 points 2 years ago (1 child)

    I really don't mind doing right-click-new-tab. What I don't like is, when you click back it often doesn't take you back to where you were before. So, totally agree with the request as it would leave you at your place.

  • source
  • hideshow 2 child comments
  • [–] 9 points 2 years ago (1 child)

    Middle click (or command-click on Mac) will also open in a new tab in basically every browser.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 1 point 2 years ago* (1 child)

    Middle click works on a Mac too if you have a pointing device with one. My Logitech trackball does, but you have to push down the scroll wheel, so I never think about it.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 15 points 2 years ago

    If you force tabs to open in a new tab/window, how do you open it in the same tab/window?

    Ultimately, it is about user control and possibly accessibility.

    Depending on your input device you can open a link in a new tab directly through

    • Middle mouse click
    • Ctrl + mouse click
    • Ctrl + Enter

    The alternative or fallback is to use the context menu like you say.

    Who says they should categorically and always open in new tabs though? In what contexts? On what kind of environment behavior does that depend? Does it assume a standard single open, auto focus, close, get back to the previous page? What makes a navigate back worse?

    If you want a general, categorical solution for your preference, as long as Lemmy does not provide a setting for it, a simple browser addon could automatically adjust all links on a websites pages, or your browser may offer it.

  • source
  • [–] 14 points 2 years ago (2 children)

    Alexandrite opens external links in new tabs.

  • source
  • hideshow 4 child comments
  • [–] 7 points 2 years ago*

    There's browser addons in the meantime. !plugins@sh.itjust.works

  • source
  • [–] 2 points 2 years ago

    Totally agree !

  • source
  • [–] 2 points 2 years ago*

    I have a greasemonkey script that does this on instances that support the "old" theme. I'm having trouble getting it to work on the default theme because target="_blank" seems to work intermittently. Or I could be doing something wrong, I haven't looked into it too deeply.

  • source
  • [–] 2 points 2 years ago

    I wrote a userscript for old.lemmy.world to make the header floaty and to force links into a new tab.

    It's not completely perfect, but it's increased my QOL and I'd hate to go back.

    It won't work on the default site, of course.

    Let me know if you want it, it's short enough to just paste in a reply.

  • source
  • [+] 1 point 2 years ago
    load more comments
    view more: next ›