Fix Bug 64686 (+ fix context menu in ie11)

This commit is contained in:
Julia Radzhabova
2023-10-16 14:24:34 +03:00
parent b499e3f923
commit 5d6027f50c
12 changed files with 29 additions and 17 deletions

View File

@ -1227,6 +1227,7 @@ define([
me._arrSpecialPaste[Asc.c_oSpecialPasteProps.overwriteCells] = documentHolder.txtOverwriteCells; me._arrSpecialPaste[Asc.c_oSpecialPasteProps.overwriteCells] = documentHolder.txtOverwriteCells;
pasteContainer = $('<div id="special-paste-container" style="position: absolute;"><div id="id-document-holder-btn-special-paste"></div></div>'); pasteContainer = $('<div id="special-paste-container" style="position: absolute;"><div id="id-document-holder-btn-special-paste"></div></div>');
!Common.Utils.isIE && pasteContainer.addClass('overflow-hidden');
documentHolder.cmpEl.find('#id_main_view').append(pasteContainer); documentHolder.cmpEl.find('#id_main_view').append(pasteContainer);
me.btnSpecialPaste = new Common.UI.Button({ me.btnSpecialPaste = new Common.UI.Button({
@ -2489,6 +2490,7 @@ define([
eqStr += '<span id="id-document-holder-btn-equation-settings"></span>'; eqStr += '<span id="id-document-holder-btn-equation-settings"></span>';
eqStr += '</div>'; eqStr += '</div>';
eqContainer = $(eqStr); eqContainer = $(eqStr);
!Common.Utils.isIE && eqContainer.addClass('overflow-hidden');
documentHolder.cmpEl.find('#id_main_view').append(eqContainer); documentHolder.cmpEl.find('#id_main_view').append(eqContainer);
var onShowBefore = function (menu) { var onShowBefore = function (menu) {
var index = menu.options.value, var index = menu.options.value,

View File

@ -599,7 +599,7 @@ define([
this.pictureMenu = new Common.UI.Menu({ this.pictureMenu = new Common.UI.Menu({
cls: 'shifted-right', cls: 'shifted-right',
restoreHeightAndTop: true, restoreHeightAndTop: !Common.Utils.isIE,
scrollToCheckedItem: false, scrollToCheckedItem: false,
initMenu: function(value){ initMenu: function(value){
if (_.isUndefined(value.imgProps)) if (_.isUndefined(value.imgProps))
@ -1250,7 +1250,7 @@ define([
this.tableMenu = new Common.UI.Menu({ this.tableMenu = new Common.UI.Menu({
cls: 'shifted-right', cls: 'shifted-right',
restoreHeightAndTop: true, restoreHeightAndTop: !Common.Utils.isIE,
scrollToCheckedItem: false, scrollToCheckedItem: false,
initMenu: function(value){ initMenu: function(value){
// table properties // table properties
@ -1855,7 +1855,7 @@ define([
this.textMenu = new Common.UI.Menu({ this.textMenu = new Common.UI.Menu({
cls: 'shifted-right', cls: 'shifted-right',
restoreHeightAndTop: true, restoreHeightAndTop: !Common.Utils.isIE,
scrollToCheckedItem: false, scrollToCheckedItem: false,
initMenu: function(value){ initMenu: function(value){
var isInShape = (value.imgProps && value.imgProps.value && !_.isNull(value.imgProps.value.get_ShapeProperties())); var isInShape = (value.imgProps && value.imgProps.value && !_.isNull(value.imgProps.value.get_ShapeProperties()));

View File

@ -1772,7 +1772,7 @@ define([
style: "width:100%;", style: "width:100%;",
menu: new Common.UI.Menu({ menu: new Common.UI.Menu({
style: 'min-width: 194px;', style: 'min-width: 194px;',
maxHeight: 200, // maxHeight: 200,
cls: 'shifted-right', cls: 'shifted-right',
items: [ items: [
{caption: this.textEditPoints, value: 0, iconCls: 'toolbar__icon btn-edit-points'}, {caption: this.textEditPoints, value: 0, iconCls: 'toolbar__icon btn-edit-points'},
@ -1782,7 +1782,7 @@ define([
menuAlign: 'tl-tl', menuAlign: 'tl-tl',
cls: 'menu-shapes menu-change-shape', cls: 'menu-shapes menu-change-shape',
items: [], items: [],
restoreHeightAndTop: true, restoreHeightAndTop: !Common.Utils.isIE,
additionalAlign: function(menuRoot, left, top) { additionalAlign: function(menuRoot, left, top) {
menuRoot.css({left: left, top: Math.max($(me.el).parent().offset().top, Common.Utils.innerHeight() - 10 - me.shapeRestoreHeight) - parseInt(menuRoot.css('margin-top'))}); menuRoot.css({left: left, top: Math.max($(me.el).parent().offset().top, Common.Utils.innerHeight() - 10 - me.shapeRestoreHeight) - parseInt(menuRoot.css('margin-top'))});
} }

View File

@ -208,8 +208,10 @@
border: @scaled-one-px-value solid @border-regular-control; border: @scaled-one-px-value solid @border-regular-control;
border-radius: 3px; border-radius: 3px;
overflow: hidden;
box-shadow: 0 5px 15px -5px rgba(0, 0, 0, 0.2); box-shadow: 0 5px 15px -5px rgba(0, 0, 0, 0.2);
&.overflow-hidden {
overflow: hidden;
}
} }
#equation-container { #equation-container {

View File

@ -1344,6 +1344,7 @@ define([
pasteContainer = $('<div id="special-paste-container" style="position: absolute;"><div id="id-document-holder-btn-special-paste"></div></div>'); pasteContainer = $('<div id="special-paste-container" style="position: absolute;"><div id="id-document-holder-btn-special-paste"></div></div>');
!Common.Utils.isIE && pasteContainer.addClass('overflow-hidden');
documentHolder.cmpEl.append(pasteContainer); documentHolder.cmpEl.append(pasteContainer);
me.btnSpecialPaste = new Common.UI.Button({ me.btnSpecialPaste = new Common.UI.Button({
@ -2526,6 +2527,7 @@ define([
eqStr += '<span id="id-document-holder-btn-equation-settings"></span>'; eqStr += '<span id="id-document-holder-btn-equation-settings"></span>';
eqStr += '</div>'; eqStr += '</div>';
eqContainer = $(eqStr); eqContainer = $(eqStr);
!Common.Utils.isIE && eqContainer.addClass('overflow-hidden');
documentHolder.cmpEl.append(eqContainer); documentHolder.cmpEl.append(eqContainer);
var onShowBefore = function (menu) { var onShowBefore = function (menu) {
var index = menu.options.value, var index = menu.options.value,

View File

@ -1000,7 +1000,7 @@ define([
me.slideMenu = new Common.UI.Menu({ me.slideMenu = new Common.UI.Menu({
cls: 'shifted-right', cls: 'shifted-right',
restoreHeightAndTop: true, restoreHeightAndTop: !Common.Utils.isIE,
scrollToCheckedItem: false, scrollToCheckedItem: false,
initMenu: function(value) { initMenu: function(value) {
var selectedLast = me.api.asc_IsLastSlideSelected(), var selectedLast = me.api.asc_IsLastSlideSelected(),
@ -2125,7 +2125,7 @@ define([
me.tableMenu = new Common.UI.Menu({ me.tableMenu = new Common.UI.Menu({
cls: 'shifted-right', cls: 'shifted-right',
restoreHeightAndTop: true, restoreHeightAndTop: !Common.Utils.isIE,
scrollToCheckedItem: false, scrollToCheckedItem: false,
initMenu: function(value){ initMenu: function(value){
// table properties // table properties
@ -2297,7 +2297,7 @@ define([
me.pictureMenu = new Common.UI.Menu({ me.pictureMenu = new Common.UI.Menu({
cls: 'shifted-right', cls: 'shifted-right',
restoreHeightAndTop: true, restoreHeightAndTop: !Common.Utils.isIE,
scrollToCheckedItem: false, scrollToCheckedItem: false,
initMenu: function(value){ initMenu: function(value){
if (me.api) { if (me.api) {

View File

@ -1637,7 +1637,7 @@ define([
style: "width:100%;", style: "width:100%;",
menu: new Common.UI.Menu({ menu: new Common.UI.Menu({
style: 'min-width: 194px;', style: 'min-width: 194px;',
maxHeight: 200, // maxHeight: 200,
items: [ items: [
{caption: this.textEditPoints, value: 0, iconCls: 'toolbar__icon btn-edit-points'}, {caption: this.textEditPoints, value: 0, iconCls: 'toolbar__icon btn-edit-points'},
{ {
@ -1646,7 +1646,7 @@ define([
menuAlign: 'tl-tl', menuAlign: 'tl-tl',
cls: 'menu-shapes menu-change-shape', cls: 'menu-shapes menu-change-shape',
items: [], items: [],
restoreHeightAndTop: true, restoreHeightAndTop: !Common.Utils.isIE,
additionalAlign: function(menuRoot, left, top) { additionalAlign: function(menuRoot, left, top) {
menuRoot.css({left: left, top: Math.max($(me.el).parent().offset().top, Common.Utils.innerHeight() - 10 - me.shapeRestoreHeight) - parseInt(menuRoot.css('margin-top'))}); menuRoot.css({left: left, top: Math.max($(me.el).parent().offset().top, Common.Utils.innerHeight() - 10 - me.shapeRestoreHeight) - parseInt(menuRoot.css('margin-top'))});
} }

View File

@ -112,8 +112,10 @@
border: @scaled-one-px-value solid @border-regular-control; border: @scaled-one-px-value solid @border-regular-control;
border-radius: 3px; border-radius: 3px;
overflow: hidden;
box-shadow: 0 5px 15px -5px rgba(0, 0, 0, 0.2); box-shadow: 0 5px 15px -5px rgba(0, 0, 0, 0.2);
&.overflow-hidden {
overflow: hidden;
}
} }
#equation-container { #equation-container {

View File

@ -3579,6 +3579,7 @@ define([
me._arrSpecialPaste[Asc.c_oSpecialPasteProps.useTextImport] = [me.txtUseTextImport, 3]; me._arrSpecialPaste[Asc.c_oSpecialPasteProps.useTextImport] = [me.txtUseTextImport, 3];
pasteContainer = $('<div id="special-paste-container" style="position: absolute;"><div id="id-document-holder-btn-special-paste"></div></div>'); pasteContainer = $('<div id="special-paste-container" style="position: absolute;"><div id="id-document-holder-btn-special-paste"></div></div>');
!Common.Utils.isIE && pasteContainer.addClass('overflow-hidden');
documentHolderView.cmpEl.find('#ws-canvas-outer').append(pasteContainer); documentHolderView.cmpEl.find('#ws-canvas-outer').append(pasteContainer);
me.btnSpecialPaste = new Common.UI.Button({ me.btnSpecialPaste = new Common.UI.Button({
@ -4837,6 +4838,7 @@ define([
eqStr += '<span id="id-document-holder-btn-equation-settings"></span>'; eqStr += '<span id="id-document-holder-btn-equation-settings"></span>';
eqStr += '</div>'; eqStr += '</div>';
eqContainer = $(eqStr); eqContainer = $(eqStr);
!Common.Utils.isIE && eqContainer.addClass('overflow-hidden');
documentHolder.cmpEl.append(eqContainer); documentHolder.cmpEl.append(eqContainer);
var onShowBefore = function (menu) { var onShowBefore = function (menu) {
var index = menu.options.value, var index = menu.options.value,

View File

@ -788,7 +788,7 @@ define([
me.ssMenu = new Common.UI.Menu({ me.ssMenu = new Common.UI.Menu({
cls: 'shifted-right', cls: 'shifted-right',
restoreHeightAndTop: true, restoreHeightAndTop: !Common.Utils.isIE,
scrollToCheckedItem: false, scrollToCheckedItem: false,
id : 'id-context-menu-cell', id : 'id-context-menu-cell',
items : [ items : [
@ -1102,7 +1102,7 @@ define([
this.imgMenu = new Common.UI.Menu({ this.imgMenu = new Common.UI.Menu({
cls: 'shifted-right', cls: 'shifted-right',
restoreHeightAndTop: true, restoreHeightAndTop: !Common.Utils.isIE,
scrollToCheckedItem: false, scrollToCheckedItem: false,
items: [ items: [
me.pmiImgCut, me.pmiImgCut,

View File

@ -1652,7 +1652,7 @@ define([
style: "width:100%;", style: "width:100%;",
menu: new Common.UI.Menu({ menu: new Common.UI.Menu({
style: 'min-width: 194px;', style: 'min-width: 194px;',
maxHeight: 200, // maxHeight: 200,
items: [ items: [
{caption: this.textEditPoints, value: 0, iconCls: 'toolbar__icon btn-edit-points'}, {caption: this.textEditPoints, value: 0, iconCls: 'toolbar__icon btn-edit-points'},
{ {
@ -1661,7 +1661,7 @@ define([
menuAlign: 'tl-tl', menuAlign: 'tl-tl',
cls: 'menu-shapes menu-change-shape', cls: 'menu-shapes menu-change-shape',
items: [], items: [],
restoreHeightAndTop: true, restoreHeightAndTop: !Common.Utils.isIE,
additionalAlign: function(menuRoot, left, top) { additionalAlign: function(menuRoot, left, top) {
menuRoot.css({left: left, top: Math.max($(me.el).parent().offset().top, Common.Utils.innerHeight() - 10 - me.shapeRestoreHeight) - parseInt(menuRoot.css('margin-top'))}); menuRoot.css({left: left, top: Math.max($(me.el).parent().offset().top, Common.Utils.innerHeight() - 10 - me.shapeRestoreHeight) - parseInt(menuRoot.css('margin-top'))});
} }

View File

@ -93,12 +93,14 @@
border: @scaled-one-px-value solid @border-regular-control; border: @scaled-one-px-value solid @border-regular-control;
border-radius: 3px; border-radius: 3px;
overflow: hidden;
box-shadow: 0 5px 15px -5px rgba(0, 0, 0, 0.2); box-shadow: 0 5px 15px -5px rgba(0, 0, 0, 0.2);
&.has-open-menu { &.has-open-menu {
z-index: @zindex-navbar + 1; z-index: @zindex-navbar + 1;
} }
&.overflow-hidden {
overflow: hidden;
}
} }
#equation-container { #equation-container {