Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8220679
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T13:36:48+00:00 2026-06-07T13:36:48+00:00

On iOS’ Safari’s bookmarks, there’s one item iPad User Guide or iPad User Guid.

  • 0

On iOS’ Safari’s bookmarks, there’s one item “iPad User Guide” or “iPad User Guid”. Open it. You can see that entire page can’t be scrolled. And sections in the page can be scrolled.

I need to achieve same effect. But I don’t wanna use any JS plug-ins like iScroll.

I use JS codes below to disable the default scroll of entire page:

document.addEventListener('touchmove', function (event) {
    event.preventDefault();
}, false);

And then use CSS codes -webkit-overflow-scrolling: touch; to enable scroll effect to a div element.

But the issue is my CSS codes can’t work if I use my JS codes. My div element can’t be scrolled when users touch move.

How to resolve this problem? Thank you!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T13:36:50+00:00Added an answer on June 7, 2026 at 1:36 pm

    The problem with your code is document.addEventListener. Adding a event listener to the whole document will get you into trouble as you noted. Instead you should only add it to the elements you don’t want to have iOS overflow scrolling (any formal name for this?).

    Adding -webkit-overflow-scrolling: touch; will cause the element to have inertial scroll within that element, but it only works properly on first scroll within the element. So if you hit the top or bottom of the scrollable element, and you scroll to the top again for example, it will move the whole page instead of just that element. There is no solution I am aware of for this to work properly.

    The best solution will be to add a event listener to all elements with a class with no-scroll. Like this (using jQuery to select the elements with a class for simplicity):

    $('.no-scroll').on('touchmove', function (event) {
      event.preventDefault();
    }, false);
    

    You might be able to prevent the second scroll from having any effect by putting it in another scrollable element. So instead of scrolling the whole page on double scroll, it will scroll the parent element, if this is possible at all.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

iOS APP question I have a special case that I want There is a
For iOS there are companies such as Flurry that give you analytics for your
iOS : I have app that open some content and i have added button
iOS has nice MFMailComposer class that let's the user compose an email. What is
iOS 5 has deep twitter integration. How can I check if the user has
On iOS/CocoaTouch I often see code that creates a new instance of NSAutoreleasePool within
(iOS) I have a view that contains multiple textviews under static headings (see image
in iOS devices, the Mail app offers Open In... option for attachments. The apps
iOS 4 has an In-App SMS SDK for sending messages, but is there a
Is iOS there is CADisplayLink, in Mac OS X there is CVDisplayLink, but I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.