# Disable content bouncing

**URL:** <https://forum.ionicframework.com/t/disable-content-bouncing/2371>\
**Category:** ionic-v1\
**Created:** [March 28, 2014, 3:14pm UTC](https://forum.ionicframework.com/t/disable-content-bouncing/2371 "2014-03-28T15:14:48Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![isawczuk](https://avatars.discourse-cdn.com/v4/letter/i/eada6e/32.png) [@isawczuk](https://forum.ionicframework.com/u/isawczuk)\
**Post date:** [March 28, 2014, 3:14pm UTC](https://forum.ionicframework.com/t/disable-content-bouncing/2371/1 "2014-03-28T15:14:48Z")

</div>

In this example:  
https://codepen.io/ionic/embed/preview/KzswD?height=300&slug-hash=KzswD&default-tabs=html,result&host=https://codepen.io  
when you drag search it bounces.  
How to disable it?

ps. In cordova config.xml I have:

```
   <preference name="webviewbounce" value="false" />
    <preference name="UIWebViewBounce" value="false" />
    <preference name="DisallowOverscroll" value="true" />

```

but it doesn’t not solve the problem.

---

<div class="post-metadata">

**Author:** ![mhartington](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mhartington/32/137757_2.png) [@mhartington](https://forum.ionicframework.com/u/mhartington)\
**Post date:** [March 28, 2014, 4:13pm UTC](https://forum.ionicframework.com/t/disable-content-bouncing/2371/2 "2014-03-28T16:13:38Z")

</div>

It’s an ionic thing, not a cordova issue.

```
 <ion-content
         has-bouncing="false"
         start-y="55"
         padding="true"
         has-tabs="true"
         has-header="true"
         >

```

Use the `has-bouncing` attribute to disable the bounce effect on the `ion-content` directive

---

<div class="post-metadata">

**Author:** ![isawczuk](https://avatars.discourse-cdn.com/v4/letter/i/eada6e/32.png) [@isawczuk](https://forum.ionicframework.com/u/isawczuk)\
**Post date:** [March 31, 2014, 6:55am UTC](https://forum.ionicframework.com/t/disable-content-bouncing/2371/3 "2014-03-31T06:55:56Z")

</div>

It was very helpful. Thank you Mike.

---

<div class="post-metadata">

**Author:** ![thoughtpalette](https://avatars.discourse-cdn.com/v4/letter/t/45deac/32.png) [@thoughtpalette](https://forum.ionicframework.com/u/thoughtpalette)\
**Post date:** [April 29, 2014, 9:38pm UTC](https://forum.ionicframework.com/t/disable-content-bouncing/2371/4 "2014-04-29T21:38:09Z")

</div>

The `has-bouncing` attribute should definitely be more visible in the docs. The fact that it overrides all three config preferences and is “on” by default, makes it extremely difficult debug when trying to turn off bouncing.

I say this coming from 3 hours changing config preferences and doing builds trying to debug this.

Thanks for your answer though, finally have bouncing turned off!

Also have a SO Question on this: [http://stackoverflow.com/questions/23374301/how-to-prevent-uiwebviewbounce-rubber-banding/23375549](http://stackoverflow.com/questions/23374301/how-to-prevent-uiwebviewbounce-rubber-banding/23375549)

---

<div class="post-metadata">

**Author:** ![josencv](https://avatars.discourse-cdn.com/v4/letter/j/65b543/32.png) [@josencv](https://forum.ionicframework.com/u/josencv)\
**Post date:** [October 6, 2014, 8:56pm UTC](https://forum.ionicframework.com/t/disable-content-bouncing/2371/5 "2014-10-06T20:56:33Z")

</div>

Is there a way to turn it off in a global scope??

---

<div class="post-metadata">

**Author:** ![jeveloper](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jeveloper](https://forum.ionicframework.com/u/jeveloper)\
**Post date:** [April 8, 2015, 3:34pm UTC](https://forum.ionicframework.com/t/disable-content-bouncing/2371/6 "2015-04-08T15:34:06Z")

</div>

Thank you 🙂

Can you confirm if the cordova settings are irrelevant then?

---

<div class="post-metadata">

**Author:** ![mhartington](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mhartington/32/137757_2.png) [@mhartington](https://forum.ionicframework.com/u/mhartington)\
**Post date:** [April 8, 2015, 3:52pm UTC](https://forum.ionicframework.com/t/disable-content-bouncing/2371/7 "2015-04-08T15:52:31Z")

</div>

No, the cordova settings aren’t irrelevant.  
They’re to prevent the entire webview from having the elastic-scrolling effect

---

<div class="post-metadata">

**Author:** ![bruno\_machado](https://avatars.discourse-cdn.com/v4/letter/b/c6cbf5/32.png) [@bruno\_machado](https://forum.ionicframework.com/u/bruno_machado)\
**Post date:** [August 5, 2015, 7:17pm UTC](https://forum.ionicframework.com/t/disable-content-bouncing/2371/8 "2015-08-05T19:17:38Z")

</div>

because the following code does not work ` **<ion-content overflow-scroll="true" has-bouncing="false" >** `, Is there any solution ?? I’m sorry the bad english

---

<div class="post-metadata">

**Author:** ![balaguru](https://avatars.discourse-cdn.com/v4/letter/b/848f3c/32.png) [@balaguru](https://forum.ionicframework.com/u/balaguru)\
**Post date:** [February 16, 2016, 12:54pm UTC](https://forum.ionicframework.com/t/disable-content-bouncing/2371/9 "2016-02-16T12:54:31Z")

</div>

> [@josencv](#):
>
> Is there a way to turn it off in a global scope??

Is there a way to turn off in a global scope?

---

<div class="post-metadata">

**Author:** ![balaguru](https://avatars.discourse-cdn.com/v4/letter/b/848f3c/32.png) [@balaguru](https://forum.ionicframework.com/u/balaguru)\
**Post date:** [February 17, 2016, 6:12am UTC](https://forum.ionicframework.com/t/disable-content-bouncing/2371/10 "2016-02-17T06:12:06Z")

</div>

@mhartington  
Has-bouncing=“false” does not prevent bouncing on iOS. I am using ionic 1.2.4

Same issue like here. Any workaround? or any temporary solution?

> [@Has-bouncing="false" does not prevent bouncing on iOS](https://forum.ionicframework.com/t/has-bouncing-false-does-not-prevent-bouncing-on-ios/38215):
>
> The has-bouncing=“false” attribute is not working for me on iOS, whether I put it on ion-content or ion-scroll, or anything. My structure is like (in Jade style): ion-view(title='Profile') ion-nav-buttons(side='right') button(ng-click='settings()').button.button-icon.icon.ion-ios-gear-outline ion-content(has-bouncing='false').has-header.has-footer ion-list ion-infinite-scroll with ion-items in the ion-list. I also have these settings …

---

<div class="post-metadata">

**Author:** ![mhartington](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mhartington/32/137757_2.png) [@mhartington](https://forum.ionicframework.com/u/mhartington)\
**Post date:** [February 24, 2016, 4:49pm UTC](https://forum.ionicframework.com/t/disable-content-bouncing/2371/11 "2016-02-24T16:49:17Z")

</div>

Hmm, looking at ios right now and it’s working for me without any issues.  
This is using 1.2.4.

---

<div class="post-metadata">

**Author:** ![Floofydoug](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/floofydoug/32/99909_2.png) [@Floofydoug](https://forum.ionicframework.com/u/Floofydoug)\
**Post date:** [April 22, 2016, 1:37pm UTC](https://forum.ionicframework.com/t/disable-content-bouncing/2371/12 "2016-04-22T13:37:20Z")

</div>

Im running 1.2.0, and the following does not disable bouncing:

```auto
<ion-content has-bouncing="false" overflow-scroll="true" class="has-header has-subheader">

```

EDIT:  
Upgraded to version 1.3, and has-bouncing works as expected.

```auto
<ion-content has-bouncing="false" class="has-header has-subheader">

```

Content scrolls normally with no bounce.

---

<div class="post-metadata">

**Author:** ![nicobytes](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/nicobytes/32/142480_2.png) [@nicobytes](https://forum.ionicframework.com/u/nicobytes)\
**Post date:** [November 29, 2016, 2:29pm UTC](https://forum.ionicframework.com/t/disable-content-bouncing/2371/13 "2016-11-29T14:29:05Z")

</div>

How to disable bouncing en Ionic 2?

---

<div class="post-metadata">

**Author:** ![mhartington](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mhartington/32/137757_2.png) [@mhartington](https://forum.ionicframework.com/u/mhartington)\
**Post date:** [December 1, 2016, 2:53pm UTC](https://forum.ionicframework.com/t/disable-content-bouncing/2371/14 "2016-12-01T14:53:59Z")

</div>

This is not possible at the moment

---

<div class="post-metadata">

**Author:** ![msio](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/msio/32/107937_2.png) [@msio](https://forum.ionicframework.com/u/msio)\
**Post date:** [March 28, 2017, 8:48am UTC](https://forum.ionicframework.com/t/disable-content-bouncing/2371/15 "2017-03-28T08:48:19Z")

</div>

There is a attribute no-bounce. Unfortunately it is not working on iOS 10 (Simulator,real Device). Is it known ?  
Thanks

---

<div class="post-metadata">

**Author:** ![madeagus](https://avatars.discourse-cdn.com/v4/letter/m/82dd89/32.png) [@madeagus](https://forum.ionicframework.com/u/madeagus)\
**Post date:** [May 4, 2017, 9:05pm UTC](https://forum.ionicframework.com/t/disable-content-bouncing/2371/16 "2017-05-04T21:05:31Z")

</div>

In case anybody want to disable bouncing globally, I am able to make it work using decorator (inspired by [decorating directive](http://angular-tips.com/blog/2013/09/experiment-decorating-directives/)). I didn’t check yet any side effect of this, but at least work for now

```auto
    app.config(['$provide', function($provide) {
        $provide.decorator('ionContentDirective', function($delegate) {
            var directive = $delegate[0];

            var compile = directive.compile;
            directive.compile = function(element, attrs) {
                    if (attrs.hasBouncing == undefined) attrs.hasBouncing = "false";
                    return compile.apply(this, arguments);
                };

            return $delegate;
        });
    }])

```

checked on the browser and ios simulator.

---

<div class="post-metadata">

**Author:** ![shanson](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/shanson/32/83971_2.png) [@shanson](https://forum.ionicframework.com/u/shanson)\
**Post date:** [May 23, 2017, 4:00pm UTC](https://forum.ionicframework.com/t/disable-content-bouncing/2371/17 "2017-05-23T16:00:25Z")

</div>

Adding the attribute `no-bounce` to my `<ion-content>` works for me on iOS 10 using Ionic 3.1.1. It correctly prevents me from scrolling past the top of the content, which makes my swipe to go back transitions much cleaner. I’m not sure why it’s not documented.

---

<div class="post-metadata">

**Author:** ![ajaysaini](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/ajaysaini/32/120608_2.png) [@ajaysaini](https://forum.ionicframework.com/u/ajaysaini)\
**Post date:** [July 3, 2017, 2:16pm UTC](https://forum.ionicframework.com/t/disable-content-bouncing/2371/18 "2017-07-03T14:16:04Z")

</div>

@shanson  
did you try on real device, it is working on emulator but not working on real device ios 10.3.2

---

<div class="post-metadata">

**Author:** ![shanson](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/shanson/32/83971_2.png) [@shanson](https://forum.ionicframework.com/u/shanson)\
**Post date:** [July 3, 2017, 7:42pm UTC](https://forum.ionicframework.com/t/disable-content-bouncing/2371/19 "2017-07-03T19:42:11Z")

</div>

@ajaysaini, yes, it appears to be working on my iPhone running 10.3.2.

---

<div class="post-metadata">

**Author:** ![1BJK903](https://avatars.discourse-cdn.com/v4/letter/1/9e8a1a/32.png) [@1BJK903](https://forum.ionicframework.com/u/1BJK903)\
**Post date:** [October 11, 2017, 6:52pm UTC](https://forum.ionicframework.com/t/disable-content-bouncing/2371/20 "2017-10-11T18:52:51Z")

</div>

> [@mhartington](#):
>
> has-bouncing=“false”

Thanks man! Works like a charm.

[Next page](https://forum.ionicframework.com/t/disable-content-bouncing/2371.md?page=2)
