On Mouse Button Double Click Bug

When you try and override the on mouse double click event on a widget button and use the left mouse button to trigger the logic within that event, during play double left clicking on the widget button does nothing. However if another button is used on the override event it works fine. This appears to be an issue with left mouse clicking on umg widget buttons. This bug is present in 4.17 and 4.17.1.

1 Like

Having the exact same issue, it goes further than double click, it doesn’t recognize single clicks either. The issue is with LMB clicks in general. 4.16.3, 4.17.1 are the versions I’ve tried on. 4.15.3 seems to work but I can’t at this point revert my entire project.

You’re saying this is by design? Is there any documentation on that? Because the fact that the Middle Mouse and the right mouse button work perfectly would seem to suggest that you’re wrong about it consuming the input. With those buttons double click fires perfectly. So are you saying that “Only” the left mouse button has a consumption issue?

And the fact that these functions work perfectly in 4.15.3 would suggest its a bug and not by design.

And since I’m just using a normal widget which is using a 2D icon image with some text set as a variable, I fail to see how your suggestions would fix my problem, or Kyles.

To be thorough, I tested the code in 4.15.3 and it works, in 4.16.3 and it works, in 4.17.1 and it does not work. Please point me to the documentation that has defined the design change you mentioned so that we can find a work around.

And for proper testing I recommend you download and test using UnrealGaimeDev’s inventory pack which is what I’ve done.

For the record, it is not limited to just the double click, single clicks do not work either. As a whole the left mouse button does not work, however other buttons do, for example, middle and right mouse work fine fire off the double click fine and allow me to drag and drop just fine.

Yes this is still a major issue. The way I have set up the inventory system in my project means that I have to use a button widget. This kind of dragging functionality with buttons and also the double click worked in previous versions of the engine. Its is no only with 4.17 and 4.17.1 that this no longer works. I cannot drag my buttons with a drag operation now with a left mouse button as is standard in lots of games, I now have to use the right or middle mouse button to do so. This can’t be by design and has to be a bug.

To better explain my situation I have an inventory system and I am using a button to act as each of the slots in the inventory. Now I have set it up so that I am able to drag one of these inventory slot widgets containing a button into another avalaibale slot, however this drag operation will not work with the left mouse button at all.

No offence, but if this is by design, its a awful design.

1 Like

Hello KyleMason,

After further testing, I found that the previous workflow for this situation was no longer working in 4.17.1. The suggested workaround for this type of issue would be to use precise click. However, I was able to reproduce this issue even when using precise click. I have written up a report and I have submitted it to the developers for further consideration. I have provided a link to the public tracker below. Please feel free to use the link provided for future updates.

Link: Unreal Engine Issues and Bug Tracker (UE-49100)

Make it a great day

Hello KyleMason,

After reading over your post and running a few tests, this result appears to be by design. The button widget consumes input. If you try this with a widget that does not consume input I believe that you will get the result that you are looking for. As an example: when using an image for testing you will find that the double click override will fire off as expected. I hope that this information helps.

Make it a great day

I reviewed the sample. This change should’ve been in the release notes. The SButton’s previous behavior had other side effects that were problematic, namely doing stuff in mouse down, but pretending it didn’t handle it. The results were that those buttons overlaying the viewport could cause clicks the user expects to hit the button to instead, say - target an enemy, because the viewport gets notified because no other widget handles it, so the SButton needed to start returning Handled to avoid this.

The correct way to have been doing this would be to do everything like you currently are, except now use OnPreviewMouseDown, which is tunneled instead of bubbled, and you can begin your drag/drop detection then. The SScrollBox does this same thing when permitting buttons inside of it with Precise Tap/Click to be scrolled.

Thank you for the quick reply guys. You can mark this as resolved now. Although can I suggest that you mention this on release notes or like in the fixes stuff on the next UE4 build, just so other people are aware of how this now works. :] Thanks for your help.

Thank you for the quick reply guys. You can mark this as resolved now. Although can I suggest that you mention this on release notes or like in the fixes stuff on the next UE4 build, just so other people are aware of how this now works. :] Thanks for your help.

Thx for the answer. OnPreviewMouseButtonDown is working with the LeftMouseButton but i think, OnMouceButtonDoubleClick is still broken with using the LeftMouseButton!? if I am wrong, i would apretiate it, if anyone can help me with that. I just despair with that…
Thank you in advance and greetings from Germany
Tim

1 Like

Hi Guys,

I found this thread from the attached issue Issue 49100 I was having a drag and drop issue that appears related to all this. I’m hoping that perhaps or someone here might be able to help me out.

I’ve modified my project to use the OnPreviewMouseButtonDown for the Detect Drag instead of OnMouseDown (which does, in fact, detect the drag once again). But I am now seeing that the Button Pressed event from the same button does not reliably fire off when pressed. In my tests, it needs 2-3 rapid presses in order to fire off the event once.

I’ve created a simple project in 4.17.2 to showcase this issue ButtonTest. Just load up the level and run it, the button on the left is draggable with left mouse, and should display debug text when pressed. You should see what I’m talking about right away.

Has anyone else seen this? or am I just doing something wrong?

Hi guys,
i am having exact the same problem as you, but i am to noob to get things working again :frowning:
can somone please tell me the exact ways of overriding the on mouse down function

thx in advance !!

It’s still broken, yes.

Double click with left mouse button still broken at 4.18.

1 Like

I just found a solution works great in my project. It works fine for single click, not tested with double click. I’m using the on preview mouse button as suggested, and all I had to do to get the button to click correctly is change the button’s click method to mouse up. It is now working perfectly for both drag and drop as well as my click calls.

Hey Herophantom,

This is still giving me issues, I’m still in the same spot from my comment above. Basically, I can’t get it to recognize a button press if the “on preview mouse button down” override is used (regardless of the click method). Would you be willing to post an example file or some screenshots on how you have the overrides hooked up to get both button press and the dragging working?

Dear Epic, can you fix it soon?
Although it works for right-click, users prefer left-mouse doubleclicks.
I understand it wasnt important until UE4 was only a game engine, but more and more architectural apps emerge with more complex UI, its a MUST HAVE.
thx

The so called “fix” only seems to work for single click operations. I was having this exact issue could not do anything on widgets with the left mouse button, couldn’t drag + Drop and i couldn’t double click to say use an item with the left mouse button but could with all the others even side buttons.

I since read through this and used the “on preview mouse button down” which has fixed my single click operations like drag + drop. But there doesn’t seem to be an “on preview mouse button double click” override.

is there a fix for the double clicks like the single click or is this still an issue?

seems a bit silly having a game engine that you cant double click buttons on