0

Got an Angular 2 app.

When I scroll the page, the page behaves like I try to swipe a little it to the sides, and a horizontal rubber band effect is happening. An effect that seems like I'm trying to swipe the page to the sides.

This problem getting worse when I really swiping an element, like a carousel. Swiping the carousel to the sides, dragging the page together with the carousel.

How can prevent this from happening?

neoswf
  • 4,730
  • 6
  • 39
  • 59
  • 1
    Really need more context to understand why this is happening, but a quickfix solution would be to make things you don't want to move unselectable: .unselectable { -moz-user-select: -moz-none; -khtml-user-select: none; -webkit-user-select: none; -o-user-select: none; user-select: none } Just add that class to anything moving that shouldn't (may not work for ionic or similar mobile-app environments).' – Z. Bagley Sep 04 '17 at 18:23
  • Thanks man! Problem was totally different. It was caused by semantic-ui framework. I'll write all down in the answer to this issue. Thanks again! – neoswf Sep 05 '17 at 13:28

1 Answers1

1

My problem was actually different. It caused by the implementation of semantic-ui grid system.

It got negative margins, margin-left:-15px; margin-right:15px and on mobile its making the screen to move horizontally on dragging.

I solved it by placing overflow:hidden over the main container. Simple as that.

neoswf
  • 4,730
  • 6
  • 39
  • 59