Preventing "bounce" on iPad displays

Discussion in 'C-Bus Automation Controllers' started by tassiebean, Jul 18, 2019.

  1. tassiebean

    tassiebean

    Joined:
    Dec 24, 2018
    Messages:
    12
    Likes Received:
    0
    I'm sure some of you have noticed that annoying bounce that occurs on an iPad display. This normally is nice eye-candy when using your iPad but for a wall-mounted iPad running your c-bus system, its gets very annoying very fast. The internet is full of various solutions that break over the years for various reasons with different browsers.

    An iPad project is best implemented using Safari and 'Add to Home Screen' so the usual browser bar at the top disappears, but in any case the bounce remains. I'm running the latest iOS, and the following code added to the CSS page fixes the page in place. YMMV.

    html {
    position: fixed;
    height: 100%;
    overflow: hidden;
    }

    body {
    width: 100vw;
    height: 100vh;
    overflow-y: scroll;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    }

    Hope it works for you, if that's what you're looking for. Can't take credit for it, but thought I'd pass it on!

    TB
     
    tassiebean, Jul 18, 2019
    #1
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.