question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

touch event handler gets called twice when it shouldn't

See original GitHub issue

Steps to reproduce:

  1. Clone this gist: https://gist.github.com/dAnjou/4ff50bf9f6813a3b7e52
  2. Execute python main.py.
  3. Touch or click the logo.

Happened using 1.7.0+build0~stable-cython+201305131851~pkg38~raring1 on Ubuntu 13.04 amd64.

Issue Analytics

  • State:closed
  • Created 10 years ago
  • Comments:8 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
dessantcommented, Apr 9, 2016

@crishoj, Button receives on_touch_up twice, the second one is for grabbing the button, print out the dispatched touch object to see the difference, on_touch_up: print(args).

If you don’t want to deal with filtering the events, use on_release.

0reactions
AndreMirascommented, Sep 13, 2017

Not sure if this is related, but I also had a similar issue (depending on the laptop). And I could resolve by updating the [input] section of ~/.kivy/config.ini, see https://github.com/AndreMiras/PyWallet/issues/7#issuecomment-307920496

Read more comments on GitHub >

github_iconTop Results From Across the Web

touch events firing twice - jquery - Stack Overflow
Your issue is that your function is getting triggered twice (once for each event type). See the DEMO here (I used mousedown and...
Read more >
Adapting Event Handling to Support Windows 8 Devices
In addition, emulated mouse events shouldn't be handled otherwise the event handler is called twice for the touch. This can be achieved by...
Read more >
button trigger behaviour: "release only" triggers twice!?
Release event can be filtered to get only one trigger if you use "context.performed" and have only ONE binding in your input action....
Read more >
Introduction to browser events - The Modern JavaScript Tutorial
Event handlers. To react on events we can assign a handler – a function that runs in case of an event. Handlers are...
Read more >
Touch events - Web APIs - MDN Web Docs - Mozilla
Setting up the event handlers. When the page loads, the startup() function shown below will be called. This sets up all the event...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found