Skip to content

Commit

Permalink
Fix Bug 70733 (+ fix click on placeholders in PE)
Browse files Browse the repository at this point in the history
  • Loading branch information
JuliaRadzhabova committed Dec 24, 2024
1 parent f2d1306 commit 22f09d0
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1200,7 +1200,9 @@ define([
var me = this;
switch (obj.type) {
case Asc.c_oAscContentControlSpecificType.DateTime:
this.onShowDateActions(obj, x, y);
setTimeout(function() {
me.onShowDateActions(obj, x, y);
}, 1);
break;
case Asc.c_oAscContentControlSpecificType.Picture:
if (obj.pr && obj.pr.get_Lock) {
Expand All @@ -1214,11 +1216,15 @@ define([
me.api.asc_UncheckContentControlButtons();
}, 500);
} else
this.onShowImageActions(obj, x, y);
setTimeout(function() {
me.onShowImageActions(obj, x, y);
}, 1);
break;
case Asc.c_oAscContentControlSpecificType.DropDownList:
case Asc.c_oAscContentControlSpecificType.ComboBox:
this.onShowListActions(obj, x, y);
setTimeout(function() {
me.onShowListActions(obj, x, y);
}, 1);
break;
}
},
Expand Down
12 changes: 9 additions & 3 deletions apps/documenteditor/main/app/controller/DocumentHolderExt.js
Original file line number Diff line number Diff line change
Expand Up @@ -1188,7 +1188,9 @@ define([], function () {
me = this;
switch (type) {
case Asc.c_oAscContentControlSpecificType.DateTime:
this.onShowDateActions(obj, x, y);
setTimeout(function() {
me.onShowDateActions(obj, x, y);
}, 1);
break;
case Asc.c_oAscContentControlSpecificType.Picture:
if (obj.pr && obj.pr.get_Lock) {
Expand Down Expand Up @@ -1227,11 +1229,15 @@ define([], function () {
me.api.asc_UncheckContentControlButtons();
}, 500);
} else
this.onShowImageActions(obj, x, y);
setTimeout(function() {
me.onShowImageActions(obj, x, y);
}, 1);
break;
case Asc.c_oAscContentControlSpecificType.DropDownList:
case Asc.c_oAscContentControlSpecificType.ComboBox:
this.onShowListActions(obj, x, y);
setTimeout(function() {
me.onShowListActions(obj, x, y);
}, 1);
break;
}
};
Expand Down
9 changes: 7 additions & 2 deletions apps/pdfeditor/main/app/controller/DocumentHolderExt.js
Original file line number Diff line number Diff line change
Expand Up @@ -1380,12 +1380,17 @@ define([], function () {
};

dh.onShowFormsPDFActions = function(obj, x, y) {
var me = this;
switch (obj.type) {
case AscPDF.FIELD_TYPES.combobox:
this.onShowListActionsPDF(obj, x, y);
setTimeout(function() {
me.onShowListActionsPDF(obj, x, y);
}, 1);
break;
case AscPDF.FIELD_TYPES.text:
this.onShowDateActionsPDF(obj, x, y);
setTimeout(function() {
me.onShowDateActionsPDF(obj, x, y);
}, 1);
break;
}
};
Expand Down
36 changes: 21 additions & 15 deletions apps/presentationeditor/main/app/controller/DocumentHolderExt.js
Original file line number Diff line number Diff line change
Expand Up @@ -1089,12 +1089,14 @@ define([], function () {
menuContainer.css({left: x, top : y});
menuContainer.attr('data-value', 'prevent-canvas-click');
this._preventClick = true;
menu.show();
setTimeout(function() {
menu.show();

menu.alignPosition();
_.delay(function() {
menu.cmpEl.find('.dataview').focus();
}, 10);
menu.alignPosition();
_.delay(function() {
menu.cmpEl.find('.dataview').focus();
}, 10);
}, 1);
this._fromShowPlaceholder = false;
};

Expand Down Expand Up @@ -1152,12 +1154,14 @@ define([], function () {
menuContainer.css({left: x, top : y});
menuContainer.attr('data-value', 'prevent-canvas-click');
this._preventClick = true;
menu.show();
setTimeout(function() {
menu.show();

menu.alignPosition();
_.delay(function() {
menu.cmpEl.focus();
}, 10);
menu.alignPosition();
_.delay(function() {
menu.cmpEl.focus();
}, 10);
}, 1);
this._fromShowPlaceholder = false;
};

Expand Down Expand Up @@ -1256,12 +1260,14 @@ define([], function () {
menuContainer.css({left: x, top : y});
menuContainer.attr('data-value', 'prevent-canvas-click');
this._preventClick = true;
menu.show();
setTimeout(function() {
menu.show();

menu.alignPosition();
_.delay(function() {
menu.cmpEl.focus();
}, 10);
menu.alignPosition();
_.delay(function() {
menu.cmpEl.focus();
}, 10);
}, 1);
this._fromShowPlaceholder = false;
};

Expand Down

0 comments on commit 22f09d0

Please sign in to comment.