Skip to content

Commit

Permalink
Merge pull request scratchfoundation#242 from LLK/fix-window-scroll-217
Browse files Browse the repository at this point in the history
Change touchmove handling in editor to prevent scrolling whole window on iOS
  • Loading branch information
chrisgarrity authored Mar 23, 2020
2 parents 3b8301e + b4fdd3c commit 09fbe4c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
3 changes: 0 additions & 3 deletions src/editor/ScratchJr.js
Original file line number Diff line number Diff line change
Expand Up @@ -226,9 +226,6 @@ export default class ScratchJr {

static editorEvents () {
document.ongesturestart = undefined;
document.ontouchmove = function (e) {
e.preventDefault();
};
window.ontouchstart = ScratchJr.unfocus;
if (isTablet) {
window.ontouchend = undefined;
Expand Down
1 change: 1 addition & 0 deletions src/editor/ui/Scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ export default class Scripts {
// It seems to have been checking if the drag was on the invisible shadow of the repeat block
// It's not clear to me why we would want this, and seems functional without it. -- TM
//if ((ths.owner.blocktype == "repeat") && !hitTest(ths.childNodes[1], pixel)) continue;
e.preventDefault();
Events.startDrag(e, ths, ScriptsPane.prepareToDrag,
ScriptsPane.dropBlock, ScriptsPane.draggingBlock, ScriptsPane.runBlock);
return;
Expand Down

0 comments on commit 09fbe4c

Please sign in to comment.