View Full Version : Hiding an overlay with a nested button

9 Aug 2010, 5:18 AM
Hey everyone. I'm trying to find a way to hide a popup overlay with a nested button or listen event. I'm able to hide the panel itself, but the overlay still remains and so does the mask. Does anyone know how I can overcome this?

9 Aug 2010, 5:23 AM
to simplify, I want to mimic the effect you get when clicking outside of a popup, but by using a button within the popup.

9 Aug 2010, 5:28 AM
Call the hide method on the panel.

9 Aug 2010, 5:31 AM
tabletStartupScreen: 'tablet_startup.png',
phoneStartupScreen: 'phone_startup.png',
icon: 'icon.png',
glossOnIcon: false,

onReady: function() {
var p = new Ext.Panel({
floating: true,
width: 200,
height: 200,
modal: true,
dockedItems: [{
xtype: 'toolbar',
dock: 'top',
items: [{
text: 'Hide',
handler: function(){

9 Aug 2010, 5:47 AM
Evant gave me a hand with this in the IRC channel. Instead of using addListener, we used on() (which allows you to set the scope).