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

BUG: cannot scroll tags with a mobile/touch screen #29

Closed
360fun opened this issue May 9, 2019 · 12 comments
Closed

BUG: cannot scroll tags with a mobile/touch screen #29

360fun opened this issue May 9, 2019 · 12 comments
Assignees
Labels
Milestone

Comments

@360fun
Copy link
Contributor

360fun commented May 9, 2019

Hi! I integrated your script in my map and I love it! :)
Some users told me that they cannot scroll down the tags menu, because the popup closes when they try to scroll it down. I tested myself on Chrome Android and I can confirm the behaviour.

HOW TO REPRODUCE THE BUG

  1. open the map from Chrome in a mobile device (touch screen) or with the Chrome mobile dev tool (it works similarly)
  2. when you try to scroll down the tags you cannot do it: the pop closes and you end up dragging the map instead of the menu
@360fun 360fun changed the title cannot scroll tags with a mobile/touch screen BUG: cannot scroll tags with a mobile/touch screen May 9, 2019
@maydemirx maydemirx added the bug label May 10, 2019
@maydemirx
Copy link
Owner

I will check, but feel yourself free to send pull-requests

@maydemirx maydemirx added this to the v0.0.5 milestone May 10, 2019
@gbiurr
Copy link

gbiurr commented Oct 15, 2019

Hi.
I've been stuck with this problem too.
I found somewhere that modifying this (in line 441) of the leaflet-tag-filter-button.js

 } else {
            L.DomEvent.on(this._container, 'click', L.DomEvent.stopPropagation);
        }

to this:

} else {
            L.DomEvent.disableClickPropagation(this._container);
        }

will do the trick.

And thanks a lot, Mehmet, for this cool filter button.
I'll ask you some questions one of these days.
Regards.
G.

@360fun
Copy link
Contributor Author

360fun commented Oct 24, 2019

Awesome!!! 😄 Thanks for the fix 🌳
Did you made a commit?

@gbiurr
Copy link

gbiurr commented Oct 25, 2019

Yep. Nice to see things working smoothly.
I actually had to disableClick and disableScroll to make it work properly. Just try it out.
No, I didn't make a commit. I don´t even think I know how to do it.
Regards.

@360fun
Copy link
Contributor Author

360fun commented Oct 25, 2019

just edit the file (GitHub forks it automatically) and send the changes! 😸
https://github.com/maydemirx/leaflet-tag-filter-button/blob/master/src/leaflet-tag-filter-button.js

yep, scrolling is missing, so it needs some more work 😛

@gbiurr
Copy link

gbiurr commented Oct 25, 2019

Well, what works for me is this:

if (!L.Browser.touch) {
            L.DomEvent.disableClickPropagation(this._container);
            L.DomEvent.disableScrollPropagation(this._container);
        } else {
            L.DomEvent.disableClickPropagation(this._container);
            L.DomEvent.disableScrollPropagation(this._container);

Which is a bit weird, but runs great on every device.

@360fun
Copy link
Contributor Author

360fun commented Oct 30, 2019

basically just do:

L.DomEvent.disableClickPropagation(this._container);
L.DomEvent.disableScrollPropagation(this._container);

no idea if this can cause problems in some cases/devices... @maydemirx what do you think?

@maydemirx
Copy link
Owner

@360fun if you test on desktop browsers and test if ok. you can send pull-request.

@maydemirx
Copy link
Owner

Hi Francesco @360fun is there any update for this issue?

@360fun
Copy link
Contributor Author

360fun commented Aug 2, 2020

I didn't make a proper test and right now I don't have time to do it, so I have no idea if the fix can cause other problems. 🙄

maydemirx added a commit that referenced this issue Aug 2, 2020
* fixed scroll error on touch devices.
maydemirx added a commit that referenced this issue Aug 2, 2020
@maydemirx
Copy link
Owner

basically just do:

L.DomEvent.disableClickPropagation(this._container);
L.DomEvent.disableScrollPropagation(this._container);

no idea if this can cause problems in some cases/devices... @maydemirx what do you think?

@360fun i fixed the issue with your suggestion. Everything seems ok. Thanks a lot.

@360fun
Copy link
Contributor Author

360fun commented Aug 2, 2020

Awesome, thanks to you! 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants