https://bugs.kde.org/show_bug.cgi?id=506314

Jonathan Marten <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED
      Latest Commit|                            |https://invent.kde.org/pim/
                   |                            |messagelib/-/commit/97c0509
                   |                            |7792bd848df0cdee073dee4211a
                   |                            |ad1acb

--- Comment #7 from Jonathan Marten <[email protected]> ---
Git commit 97c05097792bd848df0cdee073dee4211aad1acb by Jonathan Marten.
Committed on 17/07/2026 at 17:35.
Pushed by winterz into branch 'master'.

Fix the "Open Attachment" dialogue appearing after an attachment drag

The problem was that MailWebEngineView::forwardMousePressEvent() would
check that a drag could potentially be started, but not accept the
event.  So the click would also be seen and the attachment URL opened
by WebEnginePage::acceptNavigationRequest().

To fix the problem, if a drag event could potentially start then the
mouse press event is accepted so that it does not have any further effect.
If a drag event does start (within the acceptable drag distance and time),
then forwardMouseMoveEvent() sets a new flag mStartedDrag to note that a
drag has started.  When the mouse button is released, whether just after
a click or at the end of a drag, the flag is checked to see whether a
drag really did start.  If a drag did start then there is no more to do,
but if there was no drag then the attachment is opened as if it was
clicked.

When handling "kmail:loadExternal", unconditionally set the display
flag in KMailProtocolURLHandler::handleClick().  There is no user
interface to turn the option off again, and multiple clicks (for example
one delivered through forwardMouseReleaseEvent() and then another
through acceptNavigationRequest() afterwards) can toggle the option
multiple times.

M  +1    -1    messageviewer/src/viewer/urlhandlermanager.cpp
M  +19   -0    messageviewer/src/viewer/webengine/mailwebengineview.cpp
M  +10   -0    webengineviewer/src/webenginepage.cpp

https://invent.kde.org/pim/messagelib/-/commit/97c05097792bd848df0cdee073dee4211aad1acb

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to