[DE] Hide special button when it's out of view (bug 63194)

This commit is contained in:
Julia Radzhabova
2023-07-05 21:36:10 +03:00
parent 09807c611a
commit cef3ae8ac3

View File

@ -1257,20 +1257,22 @@ define([
});
(menu.items.length>0) && menu.items[0].setChecked(true, true);
}
if (coord.asc_getX()<0 || coord.asc_getY()<0) {
var showPoint = [coord.asc_getX() + coord.asc_getWidth() + 3, coord.asc_getY() + coord.asc_getHeight() + 3];
if (coord.asc_getX()<0 || coord.asc_getY()<0 || showPoint[0]>me._Width || showPoint[1]>me._Height) {
if (pasteContainer.is(':visible')) pasteContainer.hide();
$(document).off('keyup', this.wrapEvents.onKeyUp);
} else {
var showPoint = [coord.asc_getX() + coord.asc_getWidth() + 3, coord.asc_getY() + coord.asc_getHeight() + 3];
if (!Common.Utils.InternalSettings.get("de-hidden-rulers")) {
showPoint = [showPoint[0] - 19, showPoint[1] - 26];
}
pasteContainer.css({left: showPoint[0], top : showPoint[1]});
pasteContainer.show();
setTimeout(function() {
$(document).on('keyup', me.wrapEvents.onKeyUp);
}, 10);
return;
}
if (!Common.Utils.InternalSettings.get("de-hidden-rulers")) {
showPoint = [showPoint[0] - 19, showPoint[1] - 26];
}
pasteContainer.css({left: showPoint[0], top : showPoint[1]});
pasteContainer.show();
setTimeout(function() {
$(document).on('keyup', me.wrapEvents.onKeyUp);
}, 10);
this.disableSpecialPaste();
},