Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Marker onTap event is not fired since 6.2.20 #102

Open
foxgreek opened this issue Sep 8, 2023 · 11 comments
Open

Marker onTap event is not fired since 6.2.20 #102

foxgreek opened this issue Sep 8, 2023 · 11 comments

Comments

@foxgreek
Copy link

foxgreek commented Sep 8, 2023

After updating to 6.2.20, the onTap event of markers on the map is not fired anymore. Going down to 6.2.19 solved the problem.

@farfromrefug
Copy link
Member

@mohammadrafigh seems your change broke other things. Can you look at it?

@paulmlilo
Copy link

I experienced the same thing as well.

@mohammadrafigh
Copy link

@farfromrefug Well, It seems we need to check if there is an onTap listener available then we should bypass default listener. But if there is no onTap listener, then we can allow custom tap listeners. This way there is no possibility to have both. I will take a look to see if we can have both behaviors at the same time. So for now the solution for who uses onTap listener is to use 6.2.19. I will send a PR soon, hope this time it fixes everything and gets merged :)).

@foxgreek
Copy link
Author

@mohammadrafigh it is still broken in 6.2.27

@farfromrefug
Copy link
Member

@foxgreek yes this repo is looking for maintainers. I personally. dont use mapbox anymore.
If you want to have a go at it please do

@mohammadrafigh
Copy link

Hi Guys, I'm not able to reproduce your problem, It's working here. Can you provide a demo project so I can take a look?

@kakha13
Copy link
Contributor

kakha13 commented Sep 5, 2024

It is not working on iOS

@mohammadrafigh
Copy link

It's working on my projects. I'm not able to fix it unless someone provides a demo project that reproduces the problem. Otherwise I consider that it works and something might be wrong with your usage.

@kakha13
Copy link
Contributor

kakha13 commented Sep 6, 2024

It's working on my projects. I'm not able to fix it unless someone provides a demo project that reproduces the problem. Otherwise I consider that it works and something might be wrong with your usage.

Hey thanks, here is demo
mapbox-marker-demo

@mohammadrafigh
Copy link

mohammadrafigh commented Sep 6, 2024 via email

@kakha13
Copy link
Contributor

kakha13 commented Sep 20, 2024

I compared the current version with 6.2.19 and found this difference.
inside index.ios.js function: setOnMapClickListener

 if (recognizer instanceof UITapGestureRecognizer) {
      recognizer.addTargetAction(theMap['mapTapHandler'], 'tap');
      break;
  }

Change:

if (recognizer instanceof UITapGestureRecognizer) {
    tapGestureRecognizer.requireGestureRecognizerToFail(recognizer);
}

Tap on marker working now.

kakha13 added a commit to kakha13/ui-mapbox that referenced this issue Sep 20, 2024
farfromrefug added a commit that referenced this issue Sep 21, 2024
Fix iOS marker Tap function issue:#102
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants