Enable touch event propagation properly#869
Enable touch event propagation properly#869godismyjudge95 wants to merge 5 commits intomapbox:mainfrom godismyjudge95:patch-1
Conversation
This is to fix #617 It allows the event to propagate through if there are no mapbox targets nearby. This sort of breaks the one tap move drawing functionality, but still allows for the double tap to move the drawing. It also enables popups and clusters to work again. I believe this is the best temporary solution until another is found. The one provided by @Plantain here: #830 basically broke drawing completely on some browsers. I have tested extensively and am employing the patch to all my apps.
|
Thanks for proposing this fix! Take a look at the continuous integration check that failed, you have some trailing spaces that are not allowed by the linter: |
|
@godismyjudge95, could you please fix the trailing spaces for the PR to merge? |
|
@sdll @rdgfuentes It appears my fix is interfering with tests 498-502... This is due to my original statement: "This sort of breaks the one tap move drawing functionality," however, this is a necessary trade off until we can figure out another solution. To see a demo of the issue I am talking about go to this website: https://www.terraplat.com/ |
|
Any further thoughts on how to keep this moving forward? Definitely causes issues with onClick events combined with Draw. |
|
@rdgfuentes @sdll @kjkurtz @kkaefer I added a condition to my event pass through change and all the tests should pass now. |
|
@asheemmamoowala Sorry to bring you into this, but is there any way we can get this merged into the next version? This issue has been resolved for almost a year. |
|
Hi team @asheemmamoowala @rreusser @karimnaaji @arindam1993, checking in if is there a reason this PR has not been merged? Is there something preventing this change, or a different approach that would be preferred? Thanks! |
@avpeery Any idea if this has been reviewed by anyone authorized to merge it? |
|
Hi |
If you want the solution asap you could manually download my repo and include it in your project. My patch still has not been merged. :/ |
|
We're also waiting for this. 😞 |
|
@godismyjudge95 Thanks for the PR, we are using a work workaround based on this in our project. We cannot use yours directly as you check To make it more customizable, our version adds an additional item into the options object called const passthroughTouchEventModeNames = ctx.options.passthroughTouchEventModeNames || ["simple_select"];Instead of In case this will get merged, I would love if the mode(s) were customizable and not bound to |
|
@chwallen Would you be interested in submitting a PR from your fork? |
|
This PR has been open for 2+ years and I've just encountered this issue myself... surely somebody can answer why this hasn't been resolved yet? |
Would also like to know. Not a great feeling moving away from our own drawing methods just to find out during final testing that you're forced to double the amount of map click/touch related code just to have a working MVP caused by such a minute issue. |
|
Hi! I'm sorry for not getting back to you sooner. We've switched to passive event listeners instead of |
This is to fix #617
It allows the event to propagate through if there are no mapbox targets nearby.
This sort of breaks the one tap move drawing functionality, but still allows for the double tap to move the drawing.
It also enables popups and clusters to work again.
I believe this is the best temporary solution until another is found. The one provided by @Plantain here: #830
basically broke drawing completely on some browsers. I have tested extensively and am employing the patch to all my apps.