From 6463500ad3f79c73b9d7bb65a006976f3eace6b5 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Tue, 7 Nov 2017 16:23:40 +0300 Subject: [PATCH] [SSE] For Bug 36231. --- .../main/app/controller/DocumentHolder.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js b/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js index 3fbbba6dc..03e6c2717 100644 --- a/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js +++ b/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js @@ -1779,16 +1779,21 @@ define([ (menu.items.length>0) && menu.items[0].setChecked(true, true); } + if ( coord[0].asc_getX()<0 || coord[0].asc_getY()<0) { + if (pasteContainer.is(':visible')) pasteContainer.hide(); + return; + } + var rightBottom = coord[0], leftTop = coord[1], width = me.tooltips.coauth.bodyWidth - me.tooltips.coauth.XY[0] - me.tooltips.coauth.rightMenuWidth - 15, height = me.tooltips.coauth.apiHeight - 15, // height - scrollbar height showPoint = [], - btnSize = [31, 20]; - - var right = rightBottom.asc_getX() + rightBottom.asc_getWidth() + 3 + btnSize[0], + btnSize = [31, 20], + right = rightBottom.asc_getX() + rightBottom.asc_getWidth() + 3 + btnSize[0], bottom = rightBottom.asc_getY() + rightBottom.asc_getHeight() + 3 + btnSize[1]; + if (right > width) { showPoint[0] = leftTop.asc_getX(); if (bottom > height)