Skip to content

Commit

Permalink
up
Browse files Browse the repository at this point in the history
54017 committed Sep 18, 2016

Verified

This commit was signed with the committer’s verified signature.
matux Matias Pequeno
1 parent aa7f1a0 commit f0e5331
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions dist/vconsole.min.js

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion src/core/core.js
Original file line number Diff line number Diff line change
@@ -205,12 +205,14 @@ class VConsole {

let content = $.one('.vc-content', that.$dom);

content.addEventListener("touchstart", function () {
content.addEventListener("touchstart", function (e) {
let top = content.scrollTop, totalScroll = content.scrollHeight, currentScroll = top + content.offsetHeight;
if ( top === 0 ) {
content.scrollTop = 1;
if (e.target.className != 'vc-cmd-input') e.preventDefault();
} else if ( currentScroll === totalScroll ) {
content.scrollTop = top - 1;
if (e.target.className != 'vc-cmd-input') e.preventDefault();
}

});

0 comments on commit f0e5331

Please sign in to comment.