Bug 493325

Summary: left-click does not work on links with target="_blank" in HTML e-mails
Product: [Applications] kmail2 Reporter: Kamil Dudka <kdudka>
Component: generalAssignee: kdepim bugs <pim-bugs-null>
Status: CONFIRMED ---    
Severity: normal CC: markku.enakoski
Priority: NOR    
Version First Reported In: 6.1.2   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

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!