Don't close plugin dialog when ESC is pressed.
Fix Bug 32983.
This commit is contained in:
parent
3342f6e62e
commit
a3e36a3d3c
|
@ -154,7 +154,8 @@ define([
|
||||||
maxwidth: undefined,
|
maxwidth: undefined,
|
||||||
maxheight: undefined,
|
maxheight: undefined,
|
||||||
minwidth: 0,
|
minwidth: 0,
|
||||||
minheight: 0
|
minheight: 0,
|
||||||
|
enableKeyEvents: true
|
||||||
};
|
};
|
||||||
|
|
||||||
var template = '<div class="asc-window<%= modal?" modal":"" %><%= cls?" "+cls:"" %>" id="<%= id %>" style="width:<%= width %>px;">' +
|
var template = '<div class="asc-window<%= modal?" modal":"" %><%= cls?" "+cls:"" %>" id="<%= id %>" style="width:<%= width %>px;">' +
|
||||||
|
@ -182,7 +183,7 @@ define([
|
||||||
}
|
}
|
||||||
|
|
||||||
function _keydown(event) {
|
function _keydown(event) {
|
||||||
if (!this.isLocked() && this.isVisible()) {
|
if (!this.isLocked() && this.isVisible() && this.initConfig.enableKeyEvents) {
|
||||||
switch (event.keyCode) {
|
switch (event.keyCode) {
|
||||||
case Common.UI.Keys.ESC:
|
case Common.UI.Keys.ESC:
|
||||||
if ( $('.asc-loadmask').length<1 ) {
|
if ( $('.asc-loadmask').length<1 ) {
|
||||||
|
|
|
@ -198,7 +198,8 @@ define([
|
||||||
var _options = {};
|
var _options = {};
|
||||||
_.extend(_options, {
|
_.extend(_options, {
|
||||||
cls: 'advanced-settings-dlg',
|
cls: 'advanced-settings-dlg',
|
||||||
header: true
|
header: true,
|
||||||
|
enableKeyEvents: false
|
||||||
}, options);
|
}, options);
|
||||||
|
|
||||||
var header_footer = (_options.buttons && _.size(_options.buttons)>0) ? 85 : 34;
|
var header_footer = (_options.buttons && _.size(_options.buttons)>0) ? 85 : 34;
|
||||||
|
|
Loading…
Reference in a new issue