# \[BUG\] UMG MouseButtonUp event only triggers on double click

**URL:** <https://forums.unrealengine.com/t/bug-umg-mousebuttonup-event-only-triggers-on-double-click/411160>\
**Category:** UI\
**Tags:** border, binding, reproducible-bug, unreal-engine, question, UMG\
**Created:** [December 2, 2017, 2:23am UTC](https://forums.unrealengine.com/t/bug-umg-mousebuttonup-event-only-triggers-on-double-click/411160 "2017-12-02T02:23:44Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![birdfreeyahoo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@birdfreeyahoo](https://forums.unrealengine.com/u/birdfreeyahoo)\
**Post date:** [December 2, 2017, 2:23am UTC](https://forums.unrealengine.com/t/bug-umg-mousebuttonup-event-only-triggers-on-double-click/411160/1 "2017-12-02T02:23:44Z")

</div>

I discovered the following bug while working with UMG in 4.18.1: You can reproduce it by following these steps:

1. Create a new Blank Project without Starter Content
2. Create Custom Game Mode and Pawn Blueprints.
3. In World Settings, set your custom Game Mode as Default Game Mode
4. In your Custom Game Mode, set your custom Pawn as Default Pawn
5. Create an UMG Widget, add a Border element to its Canvas, Horizontal Fill, Vertical Fill, Size Y = 800, Brush Color Alpha = 0.2
6. Bind on the OnMouseButtonUp-Event of the Border
7. In the auto-generated, bound function, output some debug string message. Return Handled or Unhandled.
8. Play in Editor and repeatedly click on the border, only double clicks will trigger the event.

---

<div class="post-metadata">

**Author:** ![birdfreeyahoo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@birdfreeyahoo](https://forums.unrealengine.com/u/birdfreeyahoo)\
**Post date:** [December 2, 2017, 2:28am UTC](https://forums.unrealengine.com/t/bug-umg-mousebuttonup-event-only-triggers-on-double-click/411160/2 "2017-12-02T02:28:30Z")

</div>

The same happens in standalone, and when overwriting the widgets Mouse Up event

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [December 2, 2017, 1:39pm UTC](https://forums.unrealengine.com/t/bug-umg-mousebuttonup-event-only-triggers-on-double-click/411160/3 "2017-12-02T13:39:42Z")

</div>

I bet you forgot to handle the mouse down first:

![222261-capture.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/1/0/c10b77acfd919063c607d169688bcb9e29d690b2.png)

You can’t expect MouseUp to fire otherwise.

---

<div class="post-metadata">

**Author:** ![birdfreeyahoo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@birdfreeyahoo](https://forums.unrealengine.com/u/birdfreeyahoo)\
**Post date:** [December 2, 2017, 2:39pm UTC](https://forums.unrealengine.com/t/bug-umg-mousebuttonup-event-only-triggers-on-double-click/411160/4 "2017-12-02T14:39:37Z")

</div>

Thank you that works, but breaks the functionality of my logic

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [December 2, 2017, 4:03pm UTC](https://forums.unrealengine.com/t/bug-umg-mousebuttonup-event-only-triggers-on-double-click/411160/5 "2017-12-02T16:03:51Z")

</div>

That’s unfortunate.

In case you can’t find a satisfactory workaround, consider sharing some details regarding what you’re trying to achieve. There might be alternatives available.

Good luck.

---

<div class="post-metadata">

**Author:** ![birdfreeyahoo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@birdfreeyahoo](https://forums.unrealengine.com/u/birdfreeyahoo)\
**Post date:** [December 2, 2017, 4:11pm UTC](https://forums.unrealengine.com/t/bug-umg-mousebuttonup-event-only-triggers-on-double-click/411160/6 "2017-12-02T16:11:41Z")

</div>

I want a selection box in a RTS-like manner, so you drag a box and select units in it. That should not be possible on the whole screen, only where is no other UI.  
So I use a border to mark the area where this is possible. I need to unhandle mouse down, so normal single selection can take place also (which is in pawn logic, i know bad architecture). The problems are that

1. What this thread is about
2. That I need to click on that border first to get it focussed
3. OnMouseMove doesn’t trigger while Mouse Button Down
4. Pointer Event → GetScreenSpacePosition returns absolute coords (from OS desktop origin) which is bad for PIE or Windowed. Since drawing of the box occurs in a HUD-class and I pass the event information in my UMG Graph to this class (c++), I use VirtualDesktopToViewportPixel to convert it to viewport coords, but the conversion has no effect other than completely disabling any drawing (why ever).

I thought, since the mouse click is not realyy in a UI manner and is semantically linked to the in-game world, i catch the mouse events inside the pawn and pass it to the hud, completely omitting UMG. I will then have to find a possibility to only allow selection outside from UMG Widgets.

---

<div class="post-metadata">

**Author:** ![phil123456](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@phil123456](https://forums.unrealengine.com/u/phil123456)\
**Post date:** [March 16, 2022, 6:59am UTC](https://forums.unrealengine.com/t/bug-umg-mousebuttonup-event-only-triggers-on-double-click/411160/7 "2022-03-16T06:59:17Z")

</div>

well there should be a default hanldling  
this is really bad design
