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

[iOS] Sidebar touch event breaks layout #2449

Open
JoaoFOliveira opened this issue Sep 9, 2022 · 6 comments
Open

[iOS] Sidebar touch event breaks layout #2449

JoaoFOliveira opened this issue Sep 9, 2022 · 6 comments
Labels
browser/safari Any issues relating to Apple Safari device/mobile Any issues relating to mobile devices state/has-pr An issue which has a related PR open type/bug Any issue which is a bug or PR which fixes a bug
Milestone

Comments

@JoaoFOliveira
Copy link

Bug Report

Hi,

I've been making an app and noticed, only on iOS apparently (Safari works), the sidebar on my project when I touch/drag it back brings the pusher div over and breaks the layout.

I went over and noticed it also happens on the official website, so it's not any personal coding interference.

Steps to reproduce

  1. Go to fomantic-ui.com on iOS Safari
  2. Open sidebar on the hamburger menu
  3. Drag laterally on the sidebar

Expected result

Expect it to bring back the pushed div over to where the sidebar is, default behaviour elsewhere.

Actual result

GIF:

Sep-09-2022 17-44-10

Latest version of fomantic-ui or semantic-ui

@JoaoFOliveira JoaoFOliveira added state/awaiting-investigation Anything which needs more investigation state/awaiting-triage Any issues or pull requests which haven't yet been triaged type/bug Any issue which is a bug or PR which fixes a bug labels Sep 9, 2022
@lubber-de
Copy link
Member

lubber-de commented Sep 10, 2022

Seems to be happening since Safari 13.1 on iOS only, which seems to allow drag-resizing of single website components, which in turn is not intended for the sidebar. 😞
Until Safari 12 everything works ok as in all other browsers.

@lubber-de lubber-de added tag/help-wanted Issues which need help to fix or implement browser/safari Any issues relating to Apple Safari device/mobile Any issues relating to mobile devices and removed state/awaiting-triage Any issues or pull requests which haven't yet been triaged labels Sep 10, 2022
@JoaoFOliveira
Copy link
Author

Nice analysis, do you think there is a fix for this?

@lubber-de
Copy link
Member

lubber-de commented Sep 10, 2022

There is a workaround: preventing the default behavior on touch prevents this behavior in ios 13.1+
However, this also prevents scrolling the sidebars content if there are too many items

$('.sidebar').on("touchmove",function(event){
  event.preventDefault();
});

See
https://jsfiddle.net/lubber/7d2hxouf/31/

I tagged this for help-wanted

@lubber-de
Copy link
Member

i think i found a proper css only solution 🙂 :

.ui.sidebar {
	touch-action: pan-y;
}

I am just not quite sure if this should be the default as it would prevent other possibly wanted touch gestures
See https://fomantic-ui.com/jsfiddle/#!lubber/7d2hxouf/41/

@lubber-de lubber-de removed tag/help-wanted Issues which need help to fix or implement state/awaiting-investigation Anything which needs more investigation labels Sep 10, 2022
@lubber-de
Copy link
Member

Might be fixed by #2451 but i am not sure if we should really merge it

@lubber-de lubber-de added the state/has-pr An issue which has a related PR open label Sep 10, 2022
@lubber-de lubber-de added this to the 2.9.x milestone Sep 10, 2022
@JoaoFOliveira
Copy link
Author

That fix sorts out the draggable on the sidebar element, but it still doesn't "slide back" the pushed content, it hovers it. Because of that, still don't know if it's fixable or to close the issue. But thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
browser/safari Any issues relating to Apple Safari device/mobile Any issues relating to mobile devices state/has-pr An issue which has a related PR open type/bug Any issue which is a bug or PR which fixes a bug
Projects
None yet
Development

No branches or pull requests

2 participants