diff --git a/apps/documenteditor/main/app/view/CrossReferenceDialog.js b/apps/documenteditor/main/app/view/CrossReferenceDialog.js index ba689ea6a..094a906e3 100644 --- a/apps/documenteditor/main/app/view/CrossReferenceDialog.js +++ b/apps/documenteditor/main/app/view/CrossReferenceDialog.js @@ -185,6 +185,7 @@ define([ store: new Common.UI.DataViewStore(), itemTemplate: _.template('
<%= value %>
') }); + this.refList.on('entervalue', _.bind(this.onPrimary, this)); this.lblWhich = $window.find('#id-dlg-cross-which'); @@ -205,7 +206,10 @@ define([ this.options.handler.call(this, state); } if (state=='ok') { - this.insertReference(); + if(document.activeElement && document.activeElement.localName == 'textarea' && /area_id/.test(document.activeElement.id)){ + return; + } + !this.btnInsert.isDisabled() && this.insertReference(); return; } this.close();