You found a bug! We've classified it as
TOUCH-5328
.
We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
-
Ext.Menu swipe does not work, even in kitchen sink
We are using touch 2.3.1 and tried to implement the Ex.Menu.
Not with your example kitchen sink nor using the Ext.Menu in our application the swipe (from whatever edge) works, toggleMenu has no problem. Tried on iPad (iOS7, latest version Safari/Chrome), OSX-Mavericks (latest version Safari/Chrome)
The errors shown on the console in all cases (Kitchen sink iPad, desktop) are:
- TypeError: 'undefined' is not an object (evaluating 'this.getTranslatable().on')
>>> Ext.viewport.Default#onEdgeSwipeEnd
Code:
...
if (menu.$cover) {
menu.getTranslatable().on('animationend', function() {
if (shouldRevert) {
menu.hide();
}
}, this, {
single: true
});
menu.translate(after.translateX, after.translateY, {
preserveEndState: true,
duration: 200
});
}
else {
this.getTranslatable().on('animationend', function() {
if (shouldRevert) {
menu.hide();
}
}, this, {
single: true
});
this.translate(viewportAfter.translateX, viewportAfter.translateY, {
preserveEndState: true,
duration: 200
});
}
and
- TypeError: 'null' is not an object (evaluating 'point.x')
>>> Ext.util.Point#getDistanceTo
-
Thanks for the report! I have opened a bug in our bug tracker.
-
Sencha User
I'm also experiencing the same bug. It's strange after so many months the bug is still around. No one uses Ext.Menu component? I thought this one would be extremely popular but there are not many complaints though.
Any plans to fix it or any workaround? Thanks!
-
Sencha User
My workaround for Sencha Touch 2.4.1 is to replace in touch\src\viewport\Default.js line 1043
Code:
if (checkMenu.isHidden() !== false) {
with
Code:
if (checkMenu.isHidden() == false) {
See also here
http://stackoverflow.com/questions/2...93950#29093950
-
Sencha Premium Member
That would be
Code:
if (checkMenu.isHidden() === false) {
don't you think
-
Sencha User

Originally Posted by
vitalii.blagodir
This worked for me in Touch 2.4.1 as well.
Instead of modifying the Touch source, I created an override.
-
Sencha Premium Member
This bug still exists in ExtJS6 modern toolkit. The same fix still applies.
-
Sencha Premium Member
FYI, the override we are using for ExtJS6 Modern is below. We were getting errors in onEdgeSwipeEnd too.
In our application, we don't want to be able swipe from the side to bring the menu up (must click the button instead) as we have a carousel which the menu gets in the way of when trying to swipe through items, so we can get away with short-circuiting things.
Code:
Ext.define('App.override.viewport.Default', {
override: 'Ext.viewport.Default',
onSwipeStart: function(e) {
e.stopPropagation();
},
onEdgeSwipeStart: function(e) {
e.stopPropagation();
return;
},
onEdgeSwipeEnd: function(e) {
e.stopPropagation();
return;
}
});
-
Sencha Premium User
I have the same problem with Sencha 6.0.1 The line should be 1033
Code:
if (checkMenu.isHidden() == false) { return; }
-
29 Jul 2016, 12:19 PM
#10
It would be nice to see it eventually fixed in ExtJS 6 modern toolkit. Dear colleagues, thank you for reporting this bug and workaround. It helped a lot.