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"

On Mouse Button Down not registering on Buttons

As of the update, my drag and drop operations stopped working, what I narrowed it down to is that the drag operation is not detected because the On Mouse Button Down(Overridden) function does not trigger.

Worked great in 4.16, now it just does not trigger.


Not sure if I am doing something in the old way or if this is just plain wrong (I did debug on this and even though I am on the correct widget, mouse press on the button in the widget registers OK, But the On Mouse Button Down plainly does not register the mouse button down, tried printing just plain string instead of detecting drag and nothing.

Edit0: Moved Drag detect to On Mouse Move(with couple checks) which triggers correctly, but the Overridden function OnDragDetected does not trigger anyway for some reason

Removed and recreated all the overridden functions but they still do not trigger on the events they should be triggering at.

By the way this is created mostly based on this tutorials, with some minor tweaks but the base is the same: https://www.youtube.com/watch?v=wyC5vl64V9k

Edit1: Tested it on Linux and Mac with the same result.

Edit2: After some further experiments it seems that if you create button than the on mouse button down is captured by that button and not sent forward, But if I create just text widget, or size box with image in it the event registers OK and drag is detected and everything works as it should. (Created empty project with everything fresh to test it)

This did work in 4.16!

If anybody wants to reproduce this

  1. Create new project

  2. Place the UI widget to your Content directory(https://www.dropbox.com/s/xrv9kt664zbk4nc/NewHud.uasset?dl=0) - or create your own, it is just plain widget with overridden On Mouse Button Down(see link in main thread), and with overridden On Drag Detected with print text, and couple elements placed in the canvas panel).

  3. Add the widget to the viewport and enable inputs https://blueprintue.com/blueprint/-3jr54k2/

  4. Try dragging from the button or from the text or from any element, once a button is involved the text will not be printed. - you can debug this one widget and see when the On Mouse Button Down is executed and when it is not.

Product Version: UE 4.17
more ▼

asked Aug 08 '17 at 08:27 AM in Blueprint Scripting

avatar image

409 7 9 14

avatar image kmssn Aug 11 '17 at 10:26 PM

same here. mouse down, on drag and double click all stopped working. i tried also do overrides again with no success. hmm.

avatar image Eightshot Aug 12 '17 at 03:34 PM
avatar image aknarts Aug 13 '17 at 09:44 AM

Hi, that is the exact same issue, the button on the Hotkey widget catches the mouse event and does not let is pass through. If you want to get around it to be able to get the functionality you can drop the button as I do not think that he is using the buttons on clicked event in that tutorial. You will lose some of the graphics there(the hover and clicked effect) but otherwise it should work.

avatar image Eightshot Aug 15 '17 at 12:01 PM

I've been discussing this over on the forum (Link: https://forums.unrealengine.com/showthread.php?152385-On-event-double-click-not-firing )

It may be worth checking that out and adding any input you may have.

avatar image Eightshot Aug 15 '17 at 12:02 PM

Just to double check, have you got the button set to precise click? that seems to fix the issue for some.

avatar image aknarts Aug 15 '17 at 04:21 PM

Well I never considered the forum to be more watched than this... Yes precise click is enabled, I am aware of the tutorial you were following but my setup is not based on that.

By the way in a sense the button there is used just for the visuals and the enabled/disabled functionality of it, you can easily live without it or create your own visuals to simulate mostly the same. You are setting up the Deactivated? variable anyway so you can use that to do some branches on the caught events.

I am in process of figuring out what change caused it but the engine code is not as readable as one would wish and the merges for releases are even less convenient for that.

avatar image umbrelluck Aug 14 '17 at 08:58 AM

The same for me

avatar image oppne Aug 15 '17 at 10:45 AM

Same here

avatar image Pharros Aug 16 '17 at 01:00 AM

Same here. I've tracked it down to exactly what you've described. With enough testing, I've discovered that it still triggers for Right Click but not my Left Click. I wonder if it is a bug in 4.17 or there is another way to now do this.

avatar image aknarts Aug 18 '17 at 10:02 AM

Well right click is not caught by the button as the onclick event so that is why right click would work. What is the somewhat recommended workaround is to ditch the button in the widget, use border or image instead of it(which you can style in much the same way as the button) and handle all the events by yourself.

avatar image Bob3DGames Oct 22 '17 at 06:03 PM

Sounds like issue UE-46656:


This is, at least for me, still an issue with version 4.17.2. I get the same symptoms as with that bug except I have 'Default Viewport Mouse Capture Mode' set to permanent.

avatar image Bob3DGames Nov 21 '17 at 09:17 PM

Still an issue with 4.18. This bug effectively breaks much of my game (e.g. my entire inventory system no longer works, amongst other things).

It's frustrating that there's been a new version and a hotfix yet this very serious, game-breaking bug has been backlogged for five months.

avatar image oppne Nov 22 '17 at 08:44 AM

Hey! I have already fixed this issue on an older project, but this project was thrown away. We had to change the engine settings in visual studios to make it work. I will try and find it again!

avatar image Bob3DGames Nov 25 '17 at 09:12 PM

Ooh, that would be great if you could, thanks!

avatar image Alesinx Mar 26 '18 at 11:32 PM


I found that the event actually triggers but only when you use the right buttom of the mouse to click on it, I guess it's just a bug.

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

4 answers: sort voted first

same for me

more ▼

answered Aug 12 '17 at 12:34 PM

avatar image

33 5 5 5

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

Same here, i hope that they will fix this as soon as possible.,

more ▼

answered Aug 12 '17 at 09:10 PM

avatar image


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

I've fixed this with the help of some none on the forum. It involves a little tom foolery but it works

If you make the the widget like this instead [Overlay] . [Border] . [Image] . [Text]

The do everything as you would have before but replace the button with the border and the set style with set brush Then override the functions "one mouse enter" and "on mouse leave" and just set the brush in those to (OME) hovered brush and (OML) default brush it functions in exactly the same way as the button does.

more ▼

answered Aug 16 '17 at 09:25 AM

avatar image

87 5 10 10

avatar image Alfffffffffff Aug 16 '17 at 01:51 PM

Is not a matter of workaorunds. The problem itself is easy to fix. I would like to know if this is a real bug or is a intended rework of how mouse buttons and on buttons override works..

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

Change your OnMouseButtonDown to OnPreviewMouseButtonDown in your widget

more ▼

answered Mar 22 '18 at 05:02 PM

avatar image

Death wyrm
11 2 6

avatar image Bob3DGames Mar 22 '18 at 09:38 PM

Thanks, but that has been put forward before as a solution. However, it doesn't address the core problem, i.e. it's a workaround for a bug. Never mind the sheer amount of work it's going to involve to replace all the OnMouseButtonDown events when I shouldn't have to.

I also should mention what it says here:


OnMouseButtonDown and OnPreviewMouseButtonDown are not the same thing and one should not simply be assumed to be an appropriate, like-for-like replacement for the other. Frankly, I don't want my mouse clicks to tunnel; I want them to bubble and I shouldn't be forced into using the former because of a bug.

What we're asking here is for Epic to fix the bug.

avatar image Bob3DGames Mar 22 '18 at 09:46 PM

Further to my previous rant, I've done some further research. You should have included the following link in your answer, as it turns out that being forced to change it to the tunnelling version is 'by design'.


It seems I have some work on my hands.

(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