PDA

View Full Version : [FIXED-109] modal/overlay option breaks touch events



crp_spaeth
24 Jun 2010, 4:20 PM
This Bug appears in the kitchen sink example.

When you click on the button it seems the Modal Panel appears as expected but when you click next to the modal panel to hide it again, it will break the whole touch events on the page...

This bug doesn't appear on the ipad nor in safari for mac... just on the iphone...

I broke it down to the onFloatingTouchStart function.


onFloatingTouchStart : function(e, t) {
var doc = Ext.getDoc();
if (!this.el.contains(t)) {
doc.on('touchend', function(e) {
this.hide();
e.stopEvent();
}, this, {single: true});

e.stopEvent();
}
},

I cant explain that behavior since the single option should remove the listener after it gets called the first time... This option just seems to get ignored in this case...
the 'touchend' event is still attached to the panel and the event gets stopped again and again...

I tried to remove it manually in the listener function it self but this didn't work neither .

crp_spaeth
24 Jun 2010, 4:37 PM
The Error seems to appear when stopEvent calls stopPropagation.

With the following override the Problem doesn't appear...



onFloatingTouchStart : function(e, t) {
var doc = Ext.getDoc();
if (!this.el.contains(t)) {
doc.on('touchend', function(e) {
this.hide();
e.preventDefault();
}, this, {single: true});

e.stopEvent();
}
},

xantus
28 Jun 2010, 11:04 AM
Thanks, I've opened a ticket for this issue.

TommyMaintz
28 Jun 2010, 1:52 PM
This will be fixed in the next release. It involved a bug inside the TouchEventManager that would not properly clean up current touch tracks if you stopped the event. Thanks for helping us find out about this.