Holiday Notice: Support will be provided on a limited scale from December 24th, 2024, to January 2nd, 2025. Happy holidays and a wonderful New Year!


Topic: Click handling for buttons on top of a background with tap gesture

flashkit pro asked 6 years ago


How do you set a tap gesture on the background, but still properly handle clicks for buttons above it? I want it so you can tap the background to do something which works fine, but when I try to click a button that's on top of the background, the background "tap" event gets there first.

Anna Morawska staff answered 6 years ago


Hi there, you should use event.stopPropagation method. I've created an example for you, please check it out here. Best, Ania

Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue

  • ForumUser: Pro
  • Premium support: No
  • Technology: MDB jQuery
  • MDB Version: 4.5.10
  • Device: Mac
  • Browser: Firefox
  • OS: macOS
  • Provided sample code: No
  • Provided link: No