View Full Version : [OPEN] messagebox default button not in focus when invoked in beforetabchange event

17 Sep 2013, 9:08 AM
Hi, in the beforetabchange event, i like to show a message box. But the default button is not in focus when the messagebox is shown.

In other conditions, messagebox works properly - but not when it's invoked from beforetabchange event.

Is it a bug ? If not, any workaround ?

Thank you !

Ext.create('Ext.tab.Panel', {
width: 400,
height: 400,
renderTo: document.body,
items: [{
title: 'Foo'
}, {
title: 'Bar',
tabConfig: {
title: 'Custom Title',
tooltip: 'A button tooltip'
listeners: {
'beforetabchange': function( tabPanel, newCard, oldCard, eOpts ) {
title:'Save Changes?',
msg: 'You are closing a tab that has unsaved changes. Would you like to save your changes?',
buttons: Ext.Msg.YESNOCANCEL,
icon: Ext.Msg.QUESTION
return false;

Gary Schlosberg
17 Sep 2013, 9:51 AM
Thanks for the report! I have opened a bug in our bug tracker.