# On Mouse Button Down not registering on Buttons

**URL:** <https://forums.unrealengine.com/t/on-mouse-button-down-not-registering-on-buttons/401312>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine\
**Created:** [August 8, 2017, 8:27am UTC](https://forums.unrealengine.com/t/on-mouse-button-down-not-registering-on-buttons/401312 "2017-08-08T08:27:05Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Acheta\_Games](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Acheta\_Games](https://forums.unrealengine.com/u/Acheta_Games)\
**Post date:** [August 8, 2017, 8:27am UTC](https://forums.unrealengine.com/t/on-mouse-button-down-not-registering-on-buttons/401312/1 "2017-08-08T08:27:05Z")

</div>

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.

> **[Drag Detect posted by anonymous | blueprintUE | PasteBin For Unreal Engine 4](https://blueprintue.com/blueprint/26xyexvu/)**
>
> No description provided

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: [Drag & Drop with UMG | 01 | Live Training | Unreal Engine - YouTube](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([Dropbox - NewHud.uasset - Simplify your life](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 [blueprintUE | PasteBin For Unreal Engine 4](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.

---

<div class="post-metadata">

**Author:** ![kalekarri](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@kalekarri](https://forums.unrealengine.com/u/kalekarri)\
**Post date:** [August 11, 2017, 10:26pm UTC](https://forums.unrealengine.com/t/on-mouse-button-down-not-registering-on-buttons/401312/2 "2017-08-11T22:26:34Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Alfffffffffff](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Alfffffffffff](https://forums.unrealengine.com/u/Alfffffffffff)\
**Post date:** [August 12, 2017, 12:34pm UTC](https://forums.unrealengine.com/t/on-mouse-button-down-not-registering-on-buttons/401312/3 "2017-08-12T12:34:15Z")

</div>

same for me

---

<div class="post-metadata">

**Author:** ![David\_Oaken](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@David\_Oaken](https://forums.unrealengine.com/u/David_Oaken)\
**Post date:** [August 12, 2017, 3:34pm UTC](https://forums.unrealengine.com/t/on-mouse-button-down-not-registering-on-buttons/401312/4 "2017-08-12T15:34:59Z")

</div>

Very similar issue. If i find a fix ill let you know.

> **["On Mouse Button Double Click" wont fire.](https://forums.unrealengine.com/questions/678652/on-mouse-button-double-click-wont-fire.html)**
>
> I’ve been following UnrealGaimeDev’s series to make my inventory system on youtube, Im on this video: Everything up to now is working exactly as it should be however in this most recent video i cannot get the OnMouseButtonDoubleClick...

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_36882c471](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_36882c471](https://forums.unrealengine.com/u/anonymous_user_36882c471)\
**Post date:** [August 12, 2017, 9:10pm UTC](https://forums.unrealengine.com/t/on-mouse-button-down-not-registering-on-buttons/401312/5 "2017-08-12T21:10:24Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Acheta\_Games](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Acheta\_Games](https://forums.unrealengine.com/u/Acheta_Games)\
**Post date:** [August 13, 2017, 9:44am UTC](https://forums.unrealengine.com/t/on-mouse-button-down-not-registering-on-buttons/401312/6 "2017-08-13T09:44:23Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![umbrelluck](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@umbrelluck](https://forums.unrealengine.com/u/umbrelluck)\
**Post date:** [August 14, 2017, 8:58am UTC](https://forums.unrealengine.com/t/on-mouse-button-down-not-registering-on-buttons/401312/7 "2017-08-14T08:58:29Z")

</div>

The same for me

---

<div class="post-metadata">

**Author:** ![milkman\_penta](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@milkman\_penta](https://forums.unrealengine.com/u/milkman_penta)\
**Post date:** [August 15, 2017, 10:45am UTC](https://forums.unrealengine.com/t/on-mouse-button-down-not-registering-on-buttons/401312/8 "2017-08-15T10:45:11Z")

</div>

Same here

---

<div class="post-metadata">

**Author:** ![David\_Oaken](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@David\_Oaken](https://forums.unrealengine.com/u/David_Oaken)\
**Post date:** [August 15, 2017, 12:01pm UTC](https://forums.unrealengine.com/t/on-mouse-button-down-not-registering-on-buttons/401312/9 "2017-08-15T12:01:26Z")

</div>

I’ve been discussing this over on the forum (Link: [On event double click not firing - Blueprint Visual Scripting - Unreal Engine Forums](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.

---

<div class="post-metadata">

**Author:** ![David\_Oaken](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@David\_Oaken](https://forums.unrealengine.com/u/David_Oaken)\
**Post date:** [August 15, 2017, 12:02pm UTC](https://forums.unrealengine.com/t/on-mouse-button-down-not-registering-on-buttons/401312/10 "2017-08-15T12:02:10Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Acheta\_Games](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Acheta\_Games](https://forums.unrealengine.com/u/Acheta_Games)\
**Post date:** [August 15, 2017, 4:21pm UTC](https://forums.unrealengine.com/t/on-mouse-button-down-not-registering-on-buttons/401312/11 "2017-08-15T16:21:08Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Pharros](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Pharros](https://forums.unrealengine.com/u/Pharros)\
**Post date:** [August 16, 2017, 1:00am UTC](https://forums.unrealengine.com/t/on-mouse-button-down-not-registering-on-buttons/401312/12 "2017-08-16T01:00:28Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![David\_Oaken](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@David\_Oaken](https://forums.unrealengine.com/u/David_Oaken)\
**Post date:** [August 16, 2017, 9:25am UTC](https://forums.unrealengine.com/t/on-mouse-button-down-not-registering-on-buttons/401312/13 "2017-08-16T09:25:12Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Alfffffffffff](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Alfffffffffff](https://forums.unrealengine.com/u/Alfffffffffff)\
**Post date:** [August 16, 2017, 1:51pm UTC](https://forums.unrealengine.com/t/on-mouse-button-down-not-registering-on-buttons/401312/14 "2017-08-16T13:51:35Z")

</div>

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…

---

<div class="post-metadata">

**Author:** ![Acheta\_Games](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Acheta\_Games](https://forums.unrealengine.com/u/Acheta_Games)\
**Post date:** [August 18, 2017, 10:02am UTC](https://forums.unrealengine.com/t/on-mouse-button-down-not-registering-on-buttons/401312/15 "2017-08-18T10:02:01Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Bob3DGames](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Bob3DGames](https://forums.unrealengine.com/u/Bob3DGames)\
**Post date:** [October 22, 2017, 6:03pm UTC](https://forums.unrealengine.com/t/on-mouse-button-down-not-registering-on-buttons/401312/16 "2017-10-22T18:03:36Z")

</div>

Sounds like issue UE-46656:

[https://issues.unrealengine.com/issue/UE-46656](https://issues.unrealengine.com/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.

---

<div class="post-metadata">

**Author:** ![Bob3DGames](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Bob3DGames](https://forums.unrealengine.com/u/Bob3DGames)\
**Post date:** [November 21, 2017, 9:17pm UTC](https://forums.unrealengine.com/t/on-mouse-button-down-not-registering-on-buttons/401312/17 "2017-11-21T21:17:31Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![milkman\_penta](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@milkman\_penta](https://forums.unrealengine.com/u/milkman_penta)\
**Post date:** [November 22, 2017, 8:44am UTC](https://forums.unrealengine.com/t/on-mouse-button-down-not-registering-on-buttons/401312/18 "2017-11-22T08:44:31Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![Bob3DGames](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Bob3DGames](https://forums.unrealengine.com/u/Bob3DGames)\
**Post date:** [November 25, 2017, 9:12pm UTC](https://forums.unrealengine.com/t/on-mouse-button-down-not-registering-on-buttons/401312/19 "2017-11-25T21:12:45Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Death\_wyrm](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Death\_wyrm](https://forums.unrealengine.com/u/Death_wyrm)\
**Post date:** [March 22, 2018, 5:02pm UTC](https://forums.unrealengine.com/t/on-mouse-button-down-not-registering-on-buttons/401312/20 "2018-03-22T17:02:22Z")

</div>

Change your OnMouseButtonDown to OnPreviewMouseButtonDown in your widget

[Next page](https://forums.unrealengine.com/t/on-mouse-button-down-not-registering-on-buttons/401312.md?page=2)
