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

Issue of SideMenu on Safari #2659

Closed
jsfan3 opened this issue Dec 30, 2018 · 5 comments
Closed

Issue of SideMenu on Safari #2659

jsfan3 opened this issue Dec 30, 2018 · 5 comments
Assignees
Labels
Milestone

Comments

@jsfan3
Copy link
Contributor

jsfan3 commented Dec 30, 2018

On the Javascript port, the SideMenu works correctly, but there is an issue in Safari only (not in Chrome). The problem is that Safari uses the swipe to go back or forward in the history, while the SideMenu uses the same swipe to open or close itself. This creates a conflict and weird effects.

Is it possible to disable the Safari default behavior about the swipe? If it's not possible, is it possible to disable the SideMenu swipe only on Safari (leaving it in the native apps and in other browsers)?

@codenameone codenameone added this to the Version 6.0 milestone Dec 30, 2018
@jsfan3
Copy link
Contributor Author

jsfan3 commented Dec 30, 2018

The same issue is with Firefox on iPhone. I didn’t test yet with Firefox on Android.

@shannah
Copy link
Collaborator

shannah commented Jan 2, 2019

My initial googling is making the situation look bleak.
https://stackoverflow.com/questions/18889666/ios-7-is-there-a-way-to-disable-the-swipe-back-and-forward-functionality-in-sa

TLDR: There is no way to disable this swipe forward/back behaviour in Safari. The workarounds suggested in this thread and other places is to hack away at the browser history - but this would destroy the normal forward/back behaviour as well so it is not a good option.

@jsfan3
Copy link
Contributor Author

jsfan3 commented Jan 2, 2019

So I suppose that this is the maximum that we can do:

        // Default for the side menu
        if (!Display.getInstance().isSimulator() && "HTML5".equals(CN.getPlatformName())) {
            Toolbar.setEnableSideMenuSwipe(false);
        } else {
            Toolbar.setEnableSideMenuSwipe(true);
        }

@shannah
Copy link
Collaborator

shannah commented Jan 2, 2019

You could probably refine it a little narrower by sniffing user agent string to see if it is safari.

@shannah shannah added the wontfix label Jan 3, 2019
@shannah
Copy link
Collaborator

shannah commented Jan 3, 2019

I'm going to close this issue for now with the wontfix label. If something changes and it looks like it can be fixed, I'll reopen it.

@shannah shannah closed this as completed Jan 3, 2019
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

2 participants