mirror of
https://github.com/scratchfoundation/scratchjr.git
synced 2025-03-24 19:59:56 -04:00
Change touchmove handling in editor to prevent scrolling whole window on iOS
Fixes #217 Testing: - verify still works on Android - check anywhere that could scroll: - character or backdrop library - projects in lobby - help documentation - blocks pallette -
This commit is contained in:
parent
c1a025dd97
commit
b4fdd3c775
2 changed files with 1 additions and 3 deletions
|
@ -226,9 +226,6 @@ export default class ScratchJr {
|
||||||
|
|
||||||
static editorEvents () {
|
static editorEvents () {
|
||||||
document.ongesturestart = undefined;
|
document.ongesturestart = undefined;
|
||||||
document.ontouchmove = function (e) {
|
|
||||||
e.preventDefault();
|
|
||||||
};
|
|
||||||
window.ontouchstart = ScratchJr.unfocus;
|
window.ontouchstart = ScratchJr.unfocus;
|
||||||
if (isTablet) {
|
if (isTablet) {
|
||||||
window.ontouchend = undefined;
|
window.ontouchend = undefined;
|
||||||
|
|
|
@ -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 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
|
// 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;
|
//if ((ths.owner.blocktype == "repeat") && !hitTest(ths.childNodes[1], pixel)) continue;
|
||||||
|
e.preventDefault();
|
||||||
Events.startDrag(e, ths, ScriptsPane.prepareToDrag,
|
Events.startDrag(e, ths, ScriptsPane.prepareToDrag,
|
||||||
ScriptsPane.dropBlock, ScriptsPane.draggingBlock, ScriptsPane.runBlock);
|
ScriptsPane.dropBlock, ScriptsPane.draggingBlock, ScriptsPane.runBlock);
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Add table
Reference in a new issue