PDA

View Full Version : Default Tap Menu is not displayed on PlayBook



demon_xxi
1 Jun 2011, 12:11 PM
Hi.
I have recently discovered that when I use Sencha Touch on my page the default tap menu stops working.
I mean the browser menu that appears on long tap with Copy/Paste/Select features.
This makes text controls useless for user. it works well on iPad though.

Spending much time in debug I found that it happens because of the way Sencha handles touch events. The issue is in Ext.gesture.Manager.onTouchMove method.
There is a check in the begging of the method:


onTouchMove: function (e) {

if (!Ext.is.Android) {
e.preventDefault();
}

....


So this should not be called for PlayBook as well. When I comment this code tap menu works fine.
Since there is no check Ext.is.WebWorks or Ext.is.PlayBook I need your advise on what's the best fix here and do I need similar fixes in other places? or should it be considered in general as Android (WebKit)?

interfasys
4 Jun 2011, 2:16 PM
Try to add this in your app. I'm curious to see if it helps.

Ext.is.Playbook = navigator.userAgent.match(/Playbook/i) != null;
//Ext.is.Blackberry = Ext.is.Blackberry || Ext.is.Playbook;
Ext.is.Tablet = Ext.is.iPad || Ext.is.Playbook;
Ext.is.Phone = !Ext.is.Desktop && !Ext.is.Tablet;
Ext.is.iOS = Ext.is.iPhone || Ext.is.iPad || Ext.is.iPod;
Ext.is.Standalone = !!window.navigator.standalone;