Skip to content

Commit

Permalink
prevent default
Browse files Browse the repository at this point in the history
  • Loading branch information
AdaRoseCannon committed Jul 18, 2016
1 parent 6ea42b8 commit dcd3d05
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

* Toggle for changing side of preview bar
* Note pad for
* Touch/scroll functionality did not work on iPhone

# Testing Script

Expand Down
5 changes: 5 additions & 0 deletions src/js/oCrossword.js
Original file line number Diff line number Diff line change
Expand Up @@ -545,6 +545,11 @@ OCrossword.prototype.assemble = function assemble() {
this.hammerMC.on('panleft panright', onPanHoriz);
this.hammerMC.on('panend pressup pancancel', onPanEnd);
this.hammerMC.on('tap', onTap);
this.hammerMC.on('hammer.input', function (e) {
if (!cluesEl.contains(e.target) && !gridWrapper.contains(e.target)) {
e.preventDefault();
}
});

this.addEventListener(this.rootEl, 'click', onPanEnd);

Expand Down
8 changes: 2 additions & 6 deletions src/scss/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
.o-crossword-grid-wrapper {
flex-shrink: 0;
overflow: auto;
-webkit-overflow-scrolling: touch;
position: relative;
font-size: 1.5em;

Expand Down Expand Up @@ -239,6 +240,7 @@
}
&.expanded {
overflow-y: auto;
-webkit-overflow-scrolling: touch;
height: 100%;
max-height: 100%;
background: white;
Expand Down Expand Up @@ -281,9 +283,3 @@
}
}
}

/// Add to crossword's wrapper element (if there is one)
@mixin oCrosswordWrapper {
overflow: auto;
width: 100%;
}

0 comments on commit dcd3d05

Please sign in to comment.