Skip to content

Commit

Permalink
fix(util): Fix preventDefault logic in ionic.Gesture.gestures.Drag
Browse files Browse the repository at this point in the history
Fixes #4008

fix(ionSideMenu): prevent native scrolling when menu is open
  • Loading branch information
jskrzypek authored and mhartington committed Jul 14, 2015
1 parent b426556 commit e10b5d2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/utils/gestures.js
Expand Up @@ -1171,8 +1171,8 @@

} else if (!this.preventedFirstMove && ev.srcEvent.type == 'touchmove') {
// Prevent gestures that are not intended for this event handler from firing subsequent times
if (inst.options.prevent_default_directions.length === 0
|| inst.options.prevent_default_directions.indexOf(ev.direction) != -1) {
if (inst.options.prevent_default_directions.length > 0
&& inst.options.prevent_default_directions.indexOf(ev.direction) != -1) {
ev.srcEvent.preventDefault();
}
this.preventedFirstMove = true;
Expand Down
1 change: 1 addition & 0 deletions scss/_menu.scss
Expand Up @@ -35,6 +35,7 @@
.menu-open .menu-content .pane,
.menu-open .menu-content .scroll-content {
pointer-events: none;
overflow: hidden;
}

.grade-b .menu-content,
Expand Down

0 comments on commit e10b5d2

Please sign in to comment.