Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Open in new tab" checkbox fails to persistently save for mailto links #4824

Open
shemetz opened this issue Oct 7, 2024 · 1 comment
Open

Comments

@shemetz
Copy link

shemetz commented Oct 7, 2024

Previously brought up in the last comment here - #2947

Expected behavior.

"mailto" links should be possible to set up as "open in a new tab" which should make them be opened in a new tab

Actual behavior.

Any time you add or edit a mailto:[email protected] link, and toggle on the "Open in new tab" checkbox, the value of that checkbox is ignored and not saved. If you open it to edit again you will see that the box is unticked. The tag won't have a target="_blank" added to it. Clicking the final hyperlink will sometimes navigate the current webpage to the user's email provider site (depends on the user's default email and on the implementation by the browser)

Steps to reproduce the problem.
  • go to https://www.froala.com/wysiwyg-editor/demo
  • select some text
  • click the insert link button (Ctrl+K / Cmd+K)
  • type/paste mailto:[email protected]
  • click the "Open in new tab" checkbox
  • save
  • click the inset link button again, or cmd+K again, to edit the linked text
  • observe: the "Open in new tab" checkbox is toggled off, rather than being toggled on.
Editor version.

Newest - 4.3 at least

OS.

MacOS

Browser.

Chrome

Screenshots
s1 s2
@shemetz
Copy link
Author

shemetz commented Oct 7, 2024

Note that the behavior of clicking mailto: links is a bit weird in browsers. it depends on whether the user uses a desktop app for mails (e.g. Outlook) or uses a website (e.g. Gmail), and also depends on whether the link opens on a new tab or not (target="_blank").

On Chrome, at least, it looks like this:

  • If desktop email and no target: email application will open.
  • if browser email and no target: page will navigate to email website. this may annoy users
  • if desktop email and target="_blank": new empty tab will open, then email application will open.
    • update: with Chrome and MAil app on my Mac, a new tab isn't opened (the target value is ignored), which is good behavior.
  • if browser email and target="_blank": new tab will open with the email website.

Ultimately, it looks like the behavior of mailto: links on browsers is slightly inconsistent and toggling the "open in new tab" is generally always preferred, at least according to my tests.

I think Froala should improve the behavior here in one of two ways:

  1. Fix the bug: allow users to toggle the checkbox and apply target="_blank" as expected.
  2. Visually disable the checkbox when the address is a mailto: address, if they're committed not to allow this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant