Commit a3e36a3d authored by Julia Radzhabova's avatar Julia Radzhabova

Don't close plugin dialog when ESC is pressed.

Fix Bug 32983.
parent 3342f6e6
......@@ -154,7 +154,8 @@ define([
maxwidth: undefined,
maxheight: undefined,
minwidth: 0,
minheight: 0
minheight: 0,
enableKeyEvents: true
};
var template = '<div class="asc-window<%= modal?" modal":"" %><%= cls?" "+cls:"" %>" id="<%= id %>" style="width:<%= width %>px;">' +
......@@ -182,7 +183,7 @@ define([
}
function _keydown(event) {
if (!this.isLocked() && this.isVisible()) {
if (!this.isLocked() && this.isVisible() && this.initConfig.enableKeyEvents) {
switch (event.keyCode) {
case Common.UI.Keys.ESC:
if ( $('.asc-loadmask').length<1 ) {
......
......@@ -198,7 +198,8 @@ define([
var _options = {};
_.extend(_options, {
cls: 'advanced-settings-dlg',
header: true
header: true,
enableKeyEvents: false
}, options);
var header_footer = (_options.buttons && _.size(_options.buttons)>0) ? 85 : 34;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment