Skip to content

Overlay: No touch scrolling in ol.Overlay #5243

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

Closed
wants to merge 4 commits into from
Closed

Overlay: No touch scrolling in ol.Overlay #5243

wants to merge 4 commits into from

Conversation

AnWeber
Copy link

@AnWeber AnWeber commented Apr 18, 2016

Touch scrolling in an overlay is prevented by ol.pointer.TouchSource.prototype.touchmove. If the overlay has set the style properties max-height and overflow: auto, the overlay is not scrollable on touch devices (iOS, Android, Chrome Dev Tools)

Fiddle: http://jsfiddle.net/ttgo4wr0/1/

The workaround in issue #3253 doesn't apply because the position of the overlay should get moved with the map.

A fix for this issue would be to add ol.events.EventType.TOUCHMOVE in the overlayContainerStopEvents array in map.js: c5384a4

Fix for issue descriped in #5242
@ahocevar
Copy link
Member

This has an unpleasant side effect: when dragging the map and reaching a control with the pointer/finger, dragging will stop. I think this is undesired.

@AnWeber
Copy link
Author

AnWeber commented Apr 20, 2016

This side effect is really unpleasant. Another way to fix this issue would be to only stopPropagation of the touchmove Event, when the touchstart event was triggered inside the overlay. Maybe this should be only enabled by options on the overlay. I will check the source for a better implementation.

Only StopPropagation of touchmove if touchstart is triggered in overlay
@AnWeber AnWeber changed the title #5242 Fix for touch scrolling in overlay Overlay: No touch scrolling in ol.Overlay Apr 28, 2016
@AnWeber
Copy link
Author

AnWeber commented Apr 28, 2016

The touchmove Event is only attached, if the touchstart event is inside the overlay. Please review the changes.

@ahocevar
Copy link
Member

I'm not sure what the implications of this are, especially if a touchmove sequence is aborted. Are we guaranteed to always get a touchend after a touchstart? I think that the root of the problem might be somewhere else, and might still somehow be related to #3253. @tsauerwein, could you take a look please? You're more familiar with the pointerevent stack.

@Manjulajntuk
Copy link

How can i pass user defined external wmsurl and layer to the base layer ? Can you suggest any sample code to work on with reference links for basic understanding sir.

@bartvde
Copy link
Member

bartvde commented Jul 4, 2016

@Manjulajntuk can you stop commenting on unrelated github issues? Please ask on stack overflow instead.

@stale
Copy link

stale bot commented May 22, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label May 22, 2019
@stale stale bot closed this May 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants