SUMMARY If an attachment is dragged from the message header to anywhere (e.g. a Dolphin window), then when the mouse button is released the "Move/Copy/Link here" menu pops up correctly but the "Open Attachment?" dialogue also opens. This happens even if the drag is to somewhere that does not accept it. STEPS TO REPRODUCE 1. View an email with attachments, either in the preview pane or a separate viewer window. 2. Drag one of the attachments with the left mouse button to a Dolphin window. Observe the the "Move/Copy/Link Here" menu pops up and the "Open Attachment?" dialogue also opens. 3. Click "Cancel" on both the popup and dialogue. 4. Do the same again, but release the drag over somewhere that does not accept it - for example, onto the KMail menu bar or toolbar. Observer that nothing is dragged but the dialogue again opens. OBSERVED RESULT The "Open Attachment?" dialogue opens when a drag is finished, regardless of whether the drag is accepted or not. EXPECTED RESULT The "Open Attachment?" dialogue should only open when an attachment is single clicked, not when it is dragged. SOFTWARE/OS VERSIONS Operating System: Gentoo 2.17 KDE Plasma Version: 6.4.80 KDE Frameworks Version: 6.15.0 Qt Version: 6.8.3 Kernel Version: 6.6.47-gentoo-x86_64 (64-bit) Graphics Platform: X11 Processors: 3 × AMD Phenom(tm) II X3 705e Processor Memory: 16 GiB of RAM (15.6 GiB usable) ADDITIONAL INFORMATION messagelib: Git 8f75b946 kmail: Git e46a6a66
I confirm it
The problem is that MailWebEngineView::forwardMousePressEvent() checks that a drag could potentially be started, but does not accept the event. So the click is also seen and the attachment URL opened by WebEnginePage::acceptNavigationRequest(). The solution may be to accept the mouse press event, and then if a mouse release event happens without a drag having been started then and only then action the URL click.