Results 1 to 4 of 4

Thread: [CLOSED-166] Overlay problems?

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User
    Join Date
    May 2010
    Posts
    15

    Default [CLOSED-166] Overlay problems?

    I've got an overlay that I use for alert and prompt type functionality by hiding buttons. Bad things happen (the yes button appears to end up orphaned).

    Code:
    		Ext.ns('home', 'Ext.ux');
    
    		var overlay = new Ext.Panel({
    			floating: true,
    			modal: true,
    			centered: true,
    			width: Ext.platform.isPhone ? 260 : 400,
    			height: Ext.platform.isPhone ? 250 : 400,
    			styleHtmlContent: true,
    			scroll: 'vertical',
    			html: 'This is a test',
    			dockedItems: [{
    				xtype: 'container',
    				dock: 'bottom',
    				cls: 'bBtn',
    				items: [{
    					id: 'okBtn',
    					xtype: 'button',
    					dock: 'bottom',
    					ui: 'action',
    					text: 'OK',
    					handler: function () {
    						overlay.hide();
    					}
    				}, {
    					id: 'okCancelBtns',
    					layout: 'hbox',
    					dock: 'bottom',
    					items: [
    					{ xtype: 'button', text: 'No', ui: 'drastic', flex: 1, id: 'cancelBtn', handler: function () { if (overlay.btnFn) { overlay.btnFn(false); } overlay.btnFn = null; } },
    					{ xtype: 'button', ui: 'action', text: 'Yes', flex: 1, id: 'okBtn', handler: function () { if (overlay.btnFn) { overlay.btnFn(true); } overlay.btnFn = null; } }
    				]
    				}]
    			}, {
    				dock: 'top',
    				xtype: 'toolbar',
    				title: '?',
    				id: 'overlayTB'
    			}],
    			cls: 'htmlcontent'
    		});
    
    		home.alert = function (txt, hdr) {
    			Ext.getCmp('okCancelBtns').hide();
    			Ext.getCmp('okBtn').show();
    			overlay.update(txt);
    			overlay.setCentered(true);
    			Ext.getCmp('overlayTB').setTitle(hdr || "Alert");
    			overlay.show();
    		};
    
    		Ext.setup({
    			tabletStartupScreen: 'resources/img/tablet_startup.png',
    			phoneStartupScreen: 'resources/img/phone_startup.png',
    			icon: 'resources/img/icon.png',
    			glossOnIcon: false,
    
    			onReady: function () {
    				home.alert("FOO", "BAR");
    			}
    		});

  2. #2
    Sencha User Jamie Avins's Avatar
    Join Date
    Mar 2007
    Location
    Redwood City, California
    Posts
    3,661

    Default

    Your issue has been entered in Trac for review. Thank you for the report.

  3. #3
    Sencha Premium User evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    19,258

    Default

    This isn't a bug. You have a duplicate id ('okBtn').
    Twitter - @evantrimboli
    Former Sencha framework engineer, available for consulting.
    As of 2017-09-22 I am not employed by Sencha, all subsequent posts are my own and do not represent Sencha in any way.

  4. #4
    Sencha User
    Join Date
    May 2010
    Posts
    15

    Default

    That did fix it, thanks a lot for the remote debugging. Strange failure mode, but clearly a mistake.

    Sorry about that,
    --Max

Similar Threads

  1. Replies: 6
    Last Post: 16 Feb 2011, 10:02 AM
  2. Replies: 3
    Last Post: 7 Jul 2010, 9:00 AM
  3. [CLOSED][3.0.3] Localization Problems
    By Kevin Gale in forum Ext 3.x: Bugs
    Replies: 2
    Last Post: 7 Dec 2009, 1:13 PM
  4. [CLOSED] [1.1.4] Problems with BorderLayout
    By sdc in forum Ext GWT: Bugs (1.x)
    Replies: 4
    Last Post: 4 Dec 2008, 7:43 AM
  5. [2.0.2][CLOSED] ComboBox's problems in IE6
    By xiewufeng in forum Ext 2.x: Bugs
    Replies: 8
    Last Post: 27 Aug 2008, 12:49 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •