Skip to content

Commit

Permalink
Merge pull request #719 from OnsenUI/fix-stuff
Browse files Browse the repository at this point in the history
Fix for ons-scroller and ons-carousel. Closes #707
  • Loading branch information
argelius committed Jun 5, 2015
2 parents 1c59117 + 4f40e70 commit b9b8d08
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Expand Up @@ -34,6 +34,8 @@ v1.3.3-dev
* ons-navigator: Fixed [#691](https://github.com/OnsenUI/OnsenUI/issues/691).
* ons-icon: Fixed [#687](https://github.com/OnsenUI/OnsenUI/issues/687).
* ons-icon: Fixed [#688](https://github.com/OnsenUI/OnsenUI/issues/688).
* ons-scroller: Fixed [#707](https://github.com/OnsenUI/OnsenUI/issues/707).
* ons-carousel: Fixed a random error when event was undefined.

v1.3.2
----
Expand Down
1 change: 1 addition & 0 deletions CONTRIBUTORS.md
Expand Up @@ -25,5 +25,6 @@ List of code contributors (in no particular order):
* [Ryohei Ikegami](https://github.com/seanchas116)
* [Dominique Rahm](https://github.com/d3orn)
* [Kon Yuichi](https://github.com/konpyu)
* [zack](https://github.com/zack24q)

Please add yourself if you're not on this list but feel that you should be.
6 changes: 6 additions & 0 deletions core/css/scroller.css
Expand Up @@ -17,6 +17,7 @@ limitations under the License.

ons-scroller {
display: block;
height: 100%;
overflow: scroll;
-webkit-overflow-scrolling: touch;
-ms-overflow-style: none;
Expand All @@ -25,3 +26,8 @@ ons-scroller {
ons-scroller::-webkit-scrollbar {
display: none;
}

.ons-scroller__content {
height: 100%;
overflow: scroll;
}
4 changes: 2 additions & 2 deletions framework/views/carousel.js
Expand Up @@ -511,7 +511,7 @@ limitations under the License.
if (!waitForAction) {
this._scrollToKillOverScroll();
}
} else if (this._lastDragEvent !== null) {
} else {
this._startMomentumScroll(event);
}
this._lastDragEvent = null;
Expand All @@ -537,7 +537,7 @@ limitations under the License.
},

_startMomentumScroll: function(event) {
if (this._lastDragEvent !== null) {
if (this._lastDragEvent) {
var velocity = this._getScrollVelocity(this._lastDragEvent);
var duration = 0.3;
var scrollDelta = duration * 100 * velocity;
Expand Down

0 comments on commit b9b8d08

Please sign in to comment.