Fix Bug 47277

This commit is contained in:
Julia Radzhabova 2020-11-06 12:00:43 +03:00
parent c713710592
commit 1a644365a0
4 changed files with 44 additions and 35 deletions

View file

@ -129,45 +129,48 @@ Common.UI.FocusManager = new(function() {
}
};
Common.NotificationCenter.on({
'modal:show': function(e){
if (e && e.cid) {
if (_windows[e.cid]) {
_windows[e.cid].hidden = false;
} else {
_windows[e.cid] = {
parent: e,
hidden: false,
index: _count++
};
updateTabIndexes(true);
var _init = function() {
Common.NotificationCenter.on({
'modal:show': function(e){
if (e && e.cid) {
if (_windows[e.cid]) {
_windows[e.cid].hidden = false;
} else {
_windows[e.cid] = {
parent: e,
hidden: false,
index: _count++
};
updateTabIndexes(true);
}
}
},
'window:show': function(e){
if (e && e.cid && _windows[e.cid] && !_windows[e.cid].fields) {
_windows[e.cid].fields = register(e.getFocusedComponents());
addTraps(_windows[e.cid]);
}
var el = e ? e.getDefaultFocusableComponent() : null;
el && setTimeout(function(){ el.focus(); }, 100);
},
'modal:close': function(e, last) {
if (e && e.cid && _windows[e.cid]) {
updateTabIndexes(false);
delete _windows[e.cid];
_count--;
}
},
'modal:hide': function(e, last) {
if (e && e.cid && _windows[e.cid]) {
_windows[e.cid].hidden = true;
}
}
},
'window:show': function(e){
if (e && e.cid && _windows[e.cid] && !_windows[e.cid].fields) {
_windows[e.cid].fields = register(e.getFocusedComponents());
addTraps(_windows[e.cid]);
}
var el = e ? e.getDefaultFocusableComponent() : null;
el && setTimeout(function(){ el.focus(); }, 100);
},
'modal:close': function(e, last) {
if (e && e.cid && _windows[e.cid]) {
updateTabIndexes(false);
delete _windows[e.cid];
_count--;
}
},
'modal:hide': function(e, last) {
if (e && e.cid && _windows[e.cid]) {
_windows[e.cid].hidden = true;
}
}
});
});
};
return {
init: _init,
add: _add
}
})();

View file

@ -170,6 +170,8 @@ define([
window["flat_desine"] = true;
this.api = this.getApplication().getController('Viewport').getApi();
Common.UI.FocusManager.init();
if (this.api){
this.api.SetDrawingFreeze(true);

View file

@ -155,6 +155,8 @@ define([
window["flat_desine"] = true;
this.api = this.getApplication().getController('Viewport').getApi();
Common.UI.FocusManager.init();
if (this.api){
this.api.SetDrawingFreeze(true);
this.api.SetThemesPath("../../../../sdkjs/slide/themes/");

View file

@ -165,6 +165,8 @@ define([
// Initialize api
this.api = this.getApplication().getController('Viewport').getApi();
Common.UI.FocusManager.init();
var value = Common.localStorage.getBool("sse-settings-cachemode", true);
Common.Utils.InternalSettings.set("sse-settings-cachemode", value);
this.api.asc_setDefaultBlitMode(!!value);