x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

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.

Product Version: UE 4.17
Tags:
more ▼

asked Aug 28 '17 at 03:54 PM in Bug Reports

avatar image

KyleMason
6 1 2 5

avatar image Tronological Aug 28 '17 at 11:03 PM

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.

avatar image Rudy Q ♦♦ STAFF Aug 29 '17 at 02:17 PM

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

avatar image Tronological Aug 29 '17 at 08:35 PM

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.

http://www.mediafire.com/file/oie5jtl8r8njxvj/InventorySystem.rar

avatar image Tronological Aug 29 '17 at 08:48 PM

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.

avatar image KyleMason Aug 29 '17 at 09:31 PM

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.

avatar image Eightshot Aug 31 '17 at 12:22 PM

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

avatar image BigaCubensis Apr 08 '18 at 11:31 AM

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

avatar image mattyi85 Jun 18 '18 at 02:26 PM

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

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

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.

more ▼

answered Feb 09 '18 at 09:44 PM

avatar image

Herophantom
6

avatar image CraveClone Feb 19 '18 at 09:04 PM

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?

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

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: https://issues.unrealengine.com/issue/UE-49100

Make it a great day

more ▼

answered Aug 31 '17 at 03:32 PM

avatar image

Rudy Q ♦♦ STAFF
47.4k 545 132 524

avatar image Nick Darnell ♦♦ STAFF Sep 09 '17 at 03:54 AM

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.

avatar image KyleMason Sep 09 '17 at 09:17 AM

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.

avatar image CraveClone Sep 25 '17 at 06:33 PM

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 Nick 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?

avatar image stucki Oct 11 '17 at 12:04 PM

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

thx in advance !!

avatar image KyleMason Sep 09 '17 at 09:17 AM

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.

avatar image Bl1ZZarD86 Sep 21 '17 at 07:24 PM

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

avatar image JavierRamello Dec 17 '17 at 01:22 PM

It's still broken, yes.

avatar image Qukla Dec 24 '17 at 02:14 PM

Double click with left mouse button still broken at 4.18.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question