8000 Exclude maps from swipe action DEV-181 by pauloamorimbr · Pull Request #1398 · enketo/enketo · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Exclude maps from swipe action DEV-181 #1398

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

Merged

Conversation

pauloamorimbr
Copy link
Contributor
@pauloamorimbr pauloamorimbr commented Apr 15, 2025

Closes #1359

I have verified this PR works with

  • Online form submission
  • Offline form submission
  • Saving offline drafts
  • Loading offline drafts
  • Editing submissions
  • Form preview
  • None of the above

Why is this the best possible solution? Were any other approaches considered?

This is the simplest and recommended solution.
The exclusion of elements is a deature of the lib:
https://www.npmjs.com/package/jquery-touchswipe/v/1.6.7
http://labs.rampinteractive.co.uk/touchSwipe/docs/tutorial-Excluded_children.html

How does this change affect users? Describe intentional changes to behavior and behavior that could have accidentally been affected by code changes. In other words, what are the regression risks?

No risk of regression.
This PR only affects swipe actions, excluding an specific class used for maps, therefore avoiding triggering the swipe actions when interacting to maps.

Do we need any specific form for testing your changes? If so, please attach one.

It can be tested with the form attached to issue #1359: XLSForm_map_panning_bug.xlsx
Also in XML format (needs to be renamed from .txt to .xml): XLSForm_map_panning_bug.xml.txt

@pauloamorimbr pauloamorimbr self-assigned this Apr 15, 2025
@pauloamorimbr pauloamorimbr marked this pull request as ready for review April 17, 2025 13:00
Copy link
Contributor
@Akuukis Akuukis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, can repro the bug and confirm a fix on both emulated desktop browser (Firefox) and Android browsers (Firefox embed, Firefox, Brave).

For the record, if a swipe starts outside of map box in the left or right margin, it will still navigate the back n forth.

@pauloamorimbr pauloamorimbr changed the title exclude maps from swipe action Exclude maps from swipe action DEV-181 Apr 23, 2025
@pauloamorimbr pauloamorimbr merged commit e35dfce into main Apr 23, 2025
20 checks passed
@pauloamorimbr pauloamorimbr deleted the pamorim/issue1359-dev181-exclude-map-from-swipe-action branch April 23, 2025 12:41
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

Successfully merging this pull request may close these issues.

Panning in map-widget results in page jump
2 participants
0