diff --git a/apps/common/main/lib/component/FocusManager.js b/apps/common/main/lib/component/FocusManager.js index 918ce9227..a10b1bb16 100644 --- a/apps/common/main/lib/component/FocusManager.js +++ b/apps/common/main/lib/component/FocusManager.js @@ -100,7 +100,7 @@ Common.UI.FocusManager = function (tabindex, parent) { this.trapFirst.on('focus', function() { for (var i=0; i=0; i--) { var field = me.fields[i]; - if (field.cmp.isVisible ? field.cmp.isVisible() : field.cmp.is(':visible')) { + if ((field.cmp.isVisible ? field.cmp.isVisible() : field.cmp.is(':visible')) && !(field.cmp.isDisabled && field.cmp.isDisabled())) { var el = (field.selector) ? (field.cmp.$el || $(field.cmp.el)).find(field.selector).addBack().filter(field.selector) : field.el; el.focus(); break; diff --git a/apps/spreadsheeteditor/main/app/view/AdvancedSeparatorDialog.js b/apps/spreadsheeteditor/main/app/view/AdvancedSeparatorDialog.js index 5f2e2bf5e..76e75ba10 100644 --- a/apps/spreadsheeteditor/main/app/view/AdvancedSeparatorDialog.js +++ b/apps/spreadsheeteditor/main/app/view/AdvancedSeparatorDialog.js @@ -47,7 +47,8 @@ define([ options: { width: 330, cls: 'modal-dlg', - buttons: ['ok', 'cancel'] + buttons: ['ok', 'cancel'], + focusManager: true }, initialize : function(options) { @@ -95,6 +96,8 @@ define([ var $window = this.getChild(); $window.find('.btn').on('click', _.bind(this.onBtnClick, this)); + this.focusManager.add([this.inputDecimalSeparator, this.inputThousandsSeparator], '.form-control'); + this.afterRender(); }, diff --git a/apps/spreadsheeteditor/main/app/view/CreatePivotDialog.js b/apps/spreadsheeteditor/main/app/view/CreatePivotDialog.js index 8aa5f0837..3420c8863 100644 --- a/apps/spreadsheeteditor/main/app/view/CreatePivotDialog.js +++ b/apps/spreadsheeteditor/main/app/view/CreatePivotDialog.js @@ -48,7 +48,8 @@ define([ SSE.Views.CreatePivotDialog = Common.Views.AdvancedSettingsWindow.extend(_.extend({ options: { contentWidth: 310, - height: 250 + height: 250, + focusManager: true }, initialize : function(options) { @@ -161,6 +162,8 @@ define([ me.txtDestRange.cmpEl.find('input').focus(); }); + this.focusManager.add([this.txtSourceRange, this.txtDestRange], '.form-control'); + this.afterRender(); }, diff --git a/apps/spreadsheeteditor/main/app/view/NamedRangeEditDlg.js b/apps/spreadsheeteditor/main/app/view/NamedRangeEditDlg.js index a448d2ab5..f637376cd 100644 --- a/apps/spreadsheeteditor/main/app/view/NamedRangeEditDlg.js +++ b/apps/spreadsheeteditor/main/app/view/NamedRangeEditDlg.js @@ -52,7 +52,8 @@ define([ options: { alias: 'NamedRangeEditDlg', contentWidth: 380, - height: 250 + height: 250, + focusManager: true }, initialize: function (options) { @@ -150,7 +151,8 @@ define([ menuStyle : 'min-width: 100%;max-height: 280px;', editable : false, cls : 'input-group-nr', - data : [] + data : [], + takeFocusOnClose: true }); this.txtDataRange = new Common.UI.InputFieldBtn({ @@ -170,7 +172,9 @@ define([ } }); this.txtDataRange.on('button:click', _.bind(this.onSelectData, this)); - + + this.focusManager.add([this.inputName, this.cmbScope, this.txtDataRange], '.form-control'); + this.afterRender(); },