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"

Touch input fires click event twice on Windows 10

Build Type: Unreal Launcher and from Github

Version: 4.15.1-3348071+++UE4+Release-4.15

For some reason on windows devices when button is touched it fires two click events instead of one. It also calls SButton::OnMouseButtonDown and SButton::OnMouseButtonUp twice.

It can be reproduced both on real device with Windows 10 and Windows Simulator. I used blank project and simple user widget with UButton.

Product Version: UE 4.15
more ▼

asked Mar 22 '17 at 02:52 PM in Bug Reports

avatar image

304 16 18 29

avatar image AlekseyIlin Mar 23 '17 at 02:04 PM

You don't even have to run the game, the same thing happens in Editor.

avatar image Rudy Q ♦♦ STAFF Mar 23 '17 at 02:10 PM

Hello AlekseyIlin,

After doing some digging I found a known issue with what I believe to be the same root cause. I have provided a link below to the public tracker. Please feel free to use the link provided for future updates.

Link: https://issues.unrealengine.com/issue/UE-22105

Make it a great day

avatar image AlekseyIlin Mar 23 '17 at 02:39 PM

It says "Unknown Issue"

avatar image Rudy Q ♦♦ STAFF Mar 23 '17 at 03:59 PM

I have pushed it to public. It should be available now.

avatar image AlekseyIlin Mar 26 '17 at 08:13 AM

Bug can be reproduced on 4.8, so I don't think this bug and UE-22105 have the same root cause

avatar image Rudy Q ♦♦ STAFF Mar 27 '17 at 04:38 PM

Hello AlekseyIlin,

I have a few questions for you that will help narrow down what issue it is that you are experiencing.

Quick questions:

  1. Can you reproduce this issue in a clean project?

  2. If so, could you provide a detailed list of steps to reproduce this issue on our end?

  3. Could you provide screen shots of any settings/blueprints/widgets that may be involved with this issue?

avatar image AlekseyIlin Mar 28 '17 at 11:41 AM

After checking once again I discovered that bug can't be reproduced on 4.8, but also it can't be reproduced on 4.9 and all later versions until 4.13. Windows Multitouch was added in 4.14 and it, in my opinion, broke the touch event.

As for questions: 1 . Yes, it can be reproduced in a clean project, as I said before you don't even have to launch the game to reproduce the bug

2 . Launch windows simulator or windows 10 with touch screen, open editor with 4.15 version, touch any dropdown button, it will do nothing because click happens twice, so it opens and then immediately closes the dropdown. Alternatively you can create user widget with button add Print String to OnClicked event, then add it to the viewport (exact level blueprint used: alt text). When you run the game and touch the button it will print the message twice

3 . I don't think any particular widget is to blame, I think it has something to do with the way windows fires its input events: when user touches the screen it every time fires these events in this order: Touch started Touch ended Left mouse button down Left mouse button up Before 4.14 windows touch events weren't handled but now they are. Simple workaround I found (I don't know how well it works yet) is to not handle mouse events while touch hasn't ended (had to change engine source code for that)

avatar image Zeclown Mar 28 '17 at 05:15 PM

Hey! I'm having the same problem. At what point do you intercept the input call and block it? In PlayerController.Cpp?

avatar image AlekseyIlin Mar 28 '17 at 06:19 PM

You have to dive a bit deeper and intercept it in FSlateApplication, and for that you need to build engine from source code. I'll post my workaround later

avatar image ZhymonNorman Apr 10 '17 at 03:58 PM

Is there a link to your workaround?

avatar image AlekseyIlin Apr 10 '17 at 05:30 PM

I made a pull request with fix, and it goes one layer deeper - straight to FWindowsApplication https://github.com/EpicGames/UnrealEngine/pull/3448

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

2 answers: sort voted first

I use a stupid method to solve the problem. But it is useful.


alt text

more ▼

answered Oct 12 '17 at 06:57 PM

avatar image

21 4 5

avatar image TTimo Oct 12 '17 at 08:11 PM

Sure, I do that as well, but it's not always possible. Try to put in a drop down menu ..

avatar image Artisan-H3 Oct 13 '17 at 01:35 AM

I have not use dorp down menu yet. but i use custom method to achieve similar effects. like the following image:

alt text

4.png (416.8 kB)
avatar image gunmasterltd Dec 13 '17 at 03:06 AM

thank mate, it's work (☞ຈل͜ຈ)☞

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

If you set ShowMouseCursor to false in Player Controller class defaults, event should fire only once.

more ▼

answered May 25 '17 at 02:37 PM

avatar image

124 6 13 21

avatar image chipsuev Mar 27 '19 at 09:54 AM

I'm confirming that! That strange behaviour happened to me after upgrading from 4.19.2 to 4.20.3.

'Event On Mouse Enter' in my widget has been firing when mouse cursor was just hovering over widget.

I had 'Use Mouse for Touch' = true in Project Settings, and Show Mouse Cursor, Enable Touch Events, Enable Touch Over Events all set to true in PlayerController.

After setting Show Mouse Cursor to false and set Default Cursor to None (!! which was especially weird), 'Event On Mouse Enter' in my widget stop fire on mouse hovering.

Also I managed to solve that problem in another way: I'm checking if Mouse Event is touch, because it looks like that event is firing one time for Touch plus one time for Mouse, but only with visible(?) mouse cursor.

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

Thank you for the additional information. You were correct, The first issue that I linked was incorrect. After doing some digging I was able to find a report that shows the exact issue that you have reported here. I have provided a link below

Link: https://issues.unrealengine.com/issue/UE-43213

Make it a great day

more ▼

answered Mar 28 '17 at 05:09 PM

avatar image

Rudy Q ♦♦ STAFF
47.4k 545 132 525

avatar image Brainshack Sep 04 '17 at 08:37 AM

I am still getting the same buggy behaviour on a windows 10 touch machine using 4.17.1.

avatar image TTimo Sep 04 '17 at 09:28 PM

(just confirming - seeing this problem still as well)

avatar image plastik21 Sep 11 '17 at 01:16 PM

Oh damn.. I just wanted to convert my project to 4.17 version to get properly working touch functions :( Seems will have to use my hacks with delay again :(

avatar image Rudy Q ♦♦ STAFF Oct 02 '17 at 06:19 PM

Hello plastik21,

After running a few tests on our end. I found that this issue is no longer occurring unless "Use Mouse for Touch" is enabled in the project settings. I would suggest ensuring that this setting is disabled. I hope that this information helps.

Make it a great day

avatar image plastik21 Oct 04 '17 at 09:33 AM

Thanks, Rudy!

avatar image TTimo Oct 04 '17 at 05:54 PM

I think this would still deserve to be fixed when 'Use mouse for Touch' is selected. We rely on the feature to support both mouse and touch interaction against the same application easily.

Now it seems our alternative is to build an abstraction and process touch and mouse on separate code paths at application level.

The API between the two is inconsistent (there is Input Touch event for 'Moved' but no mouse 'Move' event for instance, also mouse events are per button when touch events give you a finger index) .. nothing impossible to work around but unfortunately more work to do for the developer.

avatar image ZLogic Oct 07 '17 at 09:02 PM

Hi Rudy, I'm still encountering this issue UE-43213 with UE4 version 4.17.1 and Win10. UE4 is basically unusuable for me on a touch-screen laptop. It's double-clicking for every touch in the editor. Checkboxes instantly revert themselves when touched. File menus instantly close themselves when opened. Expanded sections instantly collapse themselves, etc.

Could you please mark UE-43213 as Unresolved and take a deeper look into this issue? Let me know if you'd like any additional information.

avatar image Rudy Q ♦♦ STAFF Oct 09 '17 at 03:30 PM

Hello ZLogic,

The issue referenced in your last post has to do with an issue at runtime. The issue you are experiencing appears similar but is different enough that I would suggest creating a new thread for tracking purposes. After you have created a new thread you can post a link here with a reply so that someone can follow up.

Note: You may want to try and disabling "Use mouse for touch" in your project settings to see if this has any affect.

Make it a great day

avatar image ZLogic Oct 10 '17 at 07:30 PM

Okay Rudy, I've made the new thread. I've disabled Use Mouse for Touch, but the problem persists. That seems to be for running the game, while this issue is happening in the editor itself.

I look forward to hearing from you over in the other thread! https://answers.unrealengine.com/questions/714403/editor-touch-input-is-always-double-click.html

avatar image Siahpoosh Oct 19 '17 at 05:33 AM

still have problem

avatar image jb3d Nov 21 '17 at 01:46 AM

For in-game I found placing a Retriggerable Delay and setting the duration to 0 fixed the issue at least for my BP. I placed it directly after the On Clicked Events. This can be a temp fix till the issue is solved.

avatar image AnneC_96 Jul 06 '18 at 08:24 AM

i, the error is reported. If you would like to solve it, please click VOTE. ### https://issues.unrealengine.com/issue/UE-52800 ###

(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