Skip to content

Not all links open in new tab #684

@Merconix

Description

@Merconix

Describe the bug

For some reason, certain links do not get given the target="_blank" tag anymore, and so when clicked they overwrite the sable window, which is quite a pain to use.

These links are just messages with http:// or https:// urls pasted into them, nothing special, it is unrelated to the url location or who sends it.

Reproduction

  1. Send or receive a link [inconsistent, seems to happen when link sent via fluffychat]
  2. Click link
  3. Observe current tab used to open the link

Expected behavior

Expect all links to open in a new tab (as most are)

Platform and versions

1. OS: Manjaro & Android
2. Browser: Firefox 148.0.2, Electron
3. Sable Verson: Latest, happens on app.sable.moe
4. Matrix Homeserver: tested and occurs on both personal homeserver & matrix.org

Additional context

This behaviour seems to happen consistently when a message was sent by someone using the FluffyChat matrix client, which was the easiest way to test it.

This behaviour does not occur in the last version I built for myself [v1.11.1-dev (5f8a2c8)] or current base Cinny.

Once a link/message is "afflicted" with this, then it persists across all refreshes/reloads and multiple instances of sable, leading me to believe it's related to how sable processes the message contents; I couldn't figure out what causes it but I did notice a difference in the CSS classes for two messages with identical content sent from different clients, in case it helps:

Message that works as expected:
class="_1xny9xl0 _1mqalmd1 _1mqalmd0 _1xny9xla _1xny9xlp layout_MessageTextBody__1r9nvas15 layout_MessageTextBody_preWrap_true__1r9nvas16 layout_MessageTextBody_jumboEmoji_none__1r9nvas17"

Message that does not work as expected:
class="_1xny9xl0 _1mqalmd1 _1mqalmd0 _1xny9xla _1xny9xlp layout_MessageTextBody__1r9nvas15 layout_MessageTextBody_jumboEmoji_none__1r9nvas17"

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions