Bug 493325 - left-click does not work on links with target="_blank" in HTML e-mails
Summary: left-click does not work on links with target="_blank" in HTML e-mails
Status: RESOLVED FIXED
Alias: None
Product: kmail2
Classification: Applications
Component: general (other bugs)
Version First Reported In: 6.1.2
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-09-18 15:00 UTC by Kamil Dudka
Modified: 2025-12-13 09:43 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kamil Dudka 2024-09-18 15:00:07 UTC
SUMMARY
If an HTML e-mail contains `<a href="https://..." target="_blank">...</a>` and I click on the link with the left mouse button, the link is not opened and the following warning from qtwebengine appears in the terminal:
> Can not adopt content from a different WebEngineProfile.

STEPS TO REPRODUCE
1. View an HTML e-mail with such a link.
2. Click on the link with left mouse button.

OBSERVED RESULT
The link is not opened and the following warning appears in the terminal:
> Can not adopt content from a different WebEngineProfile.

EXPECTED RESULT
The link should be opened with my default Internet browser.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Gentoo Linux default/linux/amd64/23.0/systemd
KDE Plasma Version: 6.1.4
KDE Frameworks Version: 6.5.0
Qt Version: 6.7.2

ADDITIONAL INFORMATION
If I click on the link with the right mouse button and then click `Open URL`, a new page is opened in my default browser as expected.
Comment 1 Kamil Dudka 2025-06-04 07:24:20 UTC
Still reproducible with kmail 6.4.1 using:
KDE Plasma Version: 6.3.5
KDE Frameworks Version: 6.14.0
Qt Version: 6.9.0
Comment 2 Markku Enäkoski 2025-06-06 16:28:18 UTC
I can confirm this happening. For some reason unknown to me, links can be opened by holding ctrl button while left clicking. This behaviour happens in both Wayland and X11 sessions.
Manjaro Linux x86_64
KDE Plasma 6.3.5
KDE Frameworks 6.14.0
QT 6.9.0
Comment 3 Kamil Dudka 2025-06-08 17:02:09 UTC
Yep, holding Ctrl while clicking on the link works.  Thanks for the tip!
Comment 4 Bug Janitor Service 2025-12-12 20:47:46 UTC
A possibly relevant merge request was started @ https://invent.kde.org/pim/messagelib/-/merge_requests/293
Comment 5 Albert Astals Cid 2025-12-13 08:24:36 UTC
Git commit ed80e347c97cd29f662d8ffdd8241bdd2e7f74f6 by Albert Astals Cid.
Committed on 13/12/2025 at 08:03.
Pushed by aacid into branch 'master'.

Fix left-click not working on links with target="_blank" in HTML e-mails

M  +1    -1    webengineviewer/src/webenginenavigationrequestinterceptor.cpp

https://invent.kde.org/pim/messagelib/-/commit/ed80e347c97cd29f662d8ffdd8241bdd2e7f74f6
Comment 6 Albert Astals Cid 2025-12-13 09:43:06 UTC
Git commit 586ca1049c7b3b0d6f2cd3f10889aa70897c8d3e by Albert Astals Cid.
Committed on 13/12/2025 at 09:42.
Pushed by aacid into branch 'release/25.12'.

Fix left-click not working on links with target="_blank" in HTML e-mails
(cherry picked from commit ed80e347c97cd29f662d8ffdd8241bdd2e7f74f6)

M  +1    -1    webengineviewer/src/webenginenavigationrequestinterceptor.cpp

https://invent.kde.org/pim/messagelib/-/commit/586ca1049c7b3b0d6f2cd3f10889aa70897c8d3e