PDA

View Full Version : Mask of modal panel some times does not close with panel after hideOnMaskTap



innosys
11 Aug 2011, 9:04 AM
Sencha Touch version tested:

1.1.0


only default ext-all.css
Platform tested against:

iOS 4
Description:

Mask of modal panel some times does not close with panel after hideOnMaskTap after interacting with the contents of the popup
Opening the popup and then touching the mask to close the popup without interacting with the internal content does however close close both popup and hides mask
Test Case:


function showPopup() {


this.popup = new Ext.Panel({
cls: 'cards',
floating: true,
modal: true,
centered: true,
height: 350,
width: 300,
layout: {
type: 'vbox',
align: 'stretch'
},
styleHtmlContent: true,
dockedItems: [{
dock: 'top',
xtype: 'toolbar',
title: mls
}],
items: [{
xtype: 'container',
flex: 1,
layout: {
type: 'vbox',
align: 'stretch'
},
scroll: 'vertical',
items: [{
height: 160,
xtype: 'carousel',
items: [{
html: 'Carousel 1'
},{
html: 'Carousel 2'
}]
},{
flex: 1,
html: "blah<br />blah<br />blah<br />blah<br />blah<br />blah<br />blah<br />blah<br />blah<br />blah<br />blah<br />blah<br />blah<br />blah<br />blah<br />blah<br />blah<br />blah<br />blah<br />blah<br />blah<br />blah<br />blah<br />blah<br />blah<br />blah<br />blah<br />"
}]
}]
});


this.popup.show('pop');
}



Steps to reproduce the problem:

launch popup
interact with popup carousel and html area by scrolling vertically
touch the mask to have the modal popup close
The result that was expected:

modal and model mask closes
The result that occurs instead:

only modal popup closes, but the mask stays behind
Debugging already done:

none
Possible fix:

not provided

innosys
16 Aug 2011, 11:03 PM
I've been able to work around the bug by adding the following listener to the modal popup panel from the code above:



listeners: {
beforeHide: function() {
Ext.getBody().unmask();
}
}


Calling Ext.getBody().unmask(); each time the popup is hidden seems to work around the mask not hiding intermittently when it is expected to.