Safari experiences a glitch when trying to swipe diagonally on a scrollable div

I'm facing a problem with a scrollable div on my Html page for MOBILE. Here is the code:

       <div id="outer">
        <div id="inner">scrollable long content....</div>
        </div>

        and CSS
        #outer {
            background: white none repeat scroll 0 0;
            height: 300px;
            left: 0;
            margin-top: 47px;
            padding: 0.5rem;
            position: absolute;
            top: 0;
            width:65%;
            z-index: 1200;

        }
        #inner{
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0px;
           overflow: auto;
            -webkit-overflow-scrolling: touch; 
        }

The issue I'm encountering is that when scrolling diagonally from the top left to the bottom right on my mobile screen, Safari freezes for a few seconds. If I continue swiping diagonally repeatedly, the screen freezes for an extended period of time. I initially used jQuery mobile but after removing it, the issue still persists in simple Html as well. Can someone please provide some assistance? I require a scrollable side panel without affecting the scrolling of the main page.

Answer №1

To achieve a scenario where only the sidebar scrolls when it is visible, make sure to do the following:

overflow = 'hidden';

Apply this setting to the content div and remember to remove it once the sidebar is closed. The reason for it freezing on mobile devices remains unknown.

Answer №2

After encountering a similar dilemma, I managed to uncover the root cause of the problem!

It turns out that in Safari, the scroll to the top was assigned a negative value, while Chrome browser took care of it automatically.

Simply adjusting this value to 0 resolved my scrolling glitch completely.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Generating HTML content using Angular 8 and JSON data

Currently, I am managing an Angular Storybook that consists of various components. Within the stories.ts file of a component, there is a JSON snippet containing properties such as the content of a DIV element, shown below... { "accordionLink": ' ...

The svh/lvh units are experiencing unexpected issues when using Chrome on an iPhone

I'm facing an issue with my hero section that is supposed to take up the full height of the viewport. I recently tried using the new svh/lvh units, which seemed to work fine on desktop and Safari for mobile. However, when testing on Chrome for mobile ...

JSON is displaying [object object] rather than the expected values

I'm attempting to extract the values from a JSON, but when I try to retrieve them, I keep getting an object object. Could I have made a mistake in my decoding process? Here is the PHP decoding code: <?php $contenido = file_get_contents("https://w ...

The PHP Admin Panel conveniently shows the Edit post form right at the bottom of the page

After following a PHP CMS tutorial, I created this awesome website for a school. It's my first dynamic website, and I even managed to create an admin panel that looks like this. Admin Panel Pretty cool, right? Initially, I followed a basic tutorial ...

Stacking sheets of hole-punched paper on top of one another, create a visually captivating

I am in search of a way to create those distinctive black dots with papers displayed here: body { background: linear-gradient(#ccc, #fff); font: 14px sans-serif; padding: 20px; } .letter { background: #fff; box-shadow: 0 0 10px rgba ...

Implementing additional input with Jquery causes tooltips to malfunction

I am developing a form that allows users to add as many rows as needed. Each input is being treated as an array for easy data storage in the database, which is a new concept for me. $(document).ready(function() { var maxField = 10; //Limitati ...

What are the steps to utilizing the $document service in AngularJS?

I am a complete beginner when it comes to AngularJS and JavaScript in general, and I find myself a bit confused about the usage of $document. From what I understand, $document provides access to some JQuery functions. So, if I want to remove an element tha ...

What is the best way to retrieve multiple model values from a single selection in AngularJS?

I recently started learning AngularJS and have a basic question to ask. I have a select box that allows users to choose a country from a list of countries. Currently, when a country is selected, only the country code is stored in the model. However, I woul ...

Creating large custom social media buttons for increasing engagement on your content is a simple and effective

I have been working on a website where I need to create custom like and follow buttons for social media. Despite trying numerous methods, I have been unsuccessful in achieving the desired result. I meticulously followed the steps outlined on developers&ap ...

Implementing pagination to streamline search result presentation

I am struggling to implement pagination for the following query that retrieves a lengthy list of items from the database. I want to limit the display to 10 items per page but unsure how to integrate pagination into the existing function. // fetching items ...

Using jQuery's "When Done" function on a dynamically generated function call

Here is the JavaScript code snippet: In the file site-code.js .... var ajaxContentFunc = $(origin).data("modal-content-handler"); $.when(window[ajaxContentFunc]()).done(function (resp) { kModal.showContent(resp); }); In another file, there is an & ...

Output PHP Array as JSON for specific content based on conditions

My code features "conditional content" based on the type of the content, as shown below: //--- SQL query to retrieve content --- if(mysqli_num_rows($niceSQL) > 0) { while($something = mysqli_fetch_array($niceSQL)) { $type = $something["typ ...

If someone installs our chat widget on their website using an <iframe> script, I would like the widget to be deactivated when our website is experiencing downtime

We utilize an iframe to create our Chat Widget. One issue we face is that when our main website is down, it causes errors on client websites where the widget is embedded. I am looking for a way to automatically disable the "Chat widget" when our website ...

PHP code to send an HTML template via email:

When attempting to send HTML content in an email using my PHP mail code, I encountered an issue where the HTML template was not being sent along with the message. $to = $email;; $subject = 'New Order Detail&apo ...

Interactive grid feature created with HTML Canvas

Imagine my surprise when I discovered that the latest version of Google Spreadsheets is now using a canvas tag to render the spreadsheet grid, unlike the traditional <table><tr><td> method used in the past. In the previous version, only ...

I seem to be struggling with creating a masterpiece using this particular color

Description: I've implemented a canvas drawing feature on my webpage with the provided code. Users can select colors and draw, but for some reason, the selected color is not functioning properly. Any assistance in resolving this issue would be greatly ...

Automatically filling text fields in JSP using data population algorithms

Currently working on a project using jsp. The page features two text boxes. When the first text box is selected, a list of countries is retrieved from a MySQL database using jQuery. The task at hand now is: Without utilizing any events (especially button ...

Consecutive AJAX requests triggered by previous response

While there are numerous resources available regarding making synchronous AJAX calls using deferred promises, my specific issue presents a unique challenge. The process I am attempting to facilitate is as follows: Initiate an AJAX call. If the response i ...

Improving the Performance of HTML/CSS Animations - Enhanced Animation Speed

I have created an HTML page with CSS animation and transitions. <div class="container-fluid" id="team"> <div class="row first"> <div class="wrapper"></div> </div> <div class="row second"> <div class="wrapper" ...

Arrange Image on Top of Text in Div with Text Controlling Div Height

I'm looking to stack an image on top of text inside a fixed height div. The challenge is to make the image's size based on the amount of space left after accommodating the text within the same area. Ideally, I would like to achieve this using onl ...