diff --git a/apps/documenteditor/forms/app/controller/ApplicationController.js b/apps/documenteditor/forms/app/controller/ApplicationController.js
index 05959bc0c3..0b1185e911 100644
--- a/apps/documenteditor/forms/app/controller/ApplicationController.js
+++ b/apps/documenteditor/forms/app/controller/ApplicationController.js
@@ -1768,6 +1768,10 @@ define([
this.view.btnOptions.menu.on('show:after', initMenu);
+ function onMouseLeave() {
+ screenTip.toolTip.hide();
+ screenTip.isVisible = false;
+ }
screenTip = {
toolTip: new Common.UI.Tooltip({
owner: this,
@@ -1779,6 +1783,12 @@ define([
isHidden: true,
isVisible: false
};
+ screenTip.toolTip.on('tooltip:show', function () {
+ $('#id_main_view').on('mouseleave', onMouseLeave);
+ });
+ screenTip.toolTip.on('tooltip:hide',function () {
+ $('#id_main_view').off('mouseleave', onMouseLeave);
+ });
},
attachUIEvents: function() {
diff --git a/apps/documenteditor/main/app/controller/DocumentHolder.js b/apps/documenteditor/main/app/controller/DocumentHolder.js
index 553689f168..1e8f10a199 100644
--- a/apps/documenteditor/main/app/controller/DocumentHolder.js
+++ b/apps/documenteditor/main/app/controller/DocumentHolder.js
@@ -129,13 +129,6 @@ define([
me.showMathTrackOnLoad = false;
me.screenTip = {
- toolTip: new Common.UI.Tooltip({
- owner: this,
- html: true,
- title: '
Press Ctrl and click link',
- cls: 'link-tooltip'
-// style: 'word-wrap: break-word;'
- }),
strTip: '',
isHidden: true,
isVisible: false
@@ -151,7 +144,8 @@ define([
me.wrapEvents = {
userTipMousover: _.bind(me.userTipMousover, me),
userTipMousout: _.bind(me.userTipMousout, me),
- onKeyUp: _.bind(me.onKeyUp, me)
+ onKeyUp: _.bind(me.onKeyUp, me),
+ onMouseLeave: _.bind(me.onMouseLeave, me)
};
var keymap = {};
@@ -175,8 +169,7 @@ define([
var me = this;
Common.NotificationCenter.on({
'window:show': function(e){
- me.screenTip.toolTip.hide();
- me.screenTip.isVisible = false;
+ me.hideScreentip();
/** coauthoring begin **/
me.userTipHide();
/** coauthoring end **/
@@ -188,8 +181,7 @@ define([
me.hideTips();
},
'layout:changed': function(e){
- me.screenTip.toolTip.hide();
- me.screenTip.isVisible = false;
+ me.hideScreentip();
/** coauthoring begin **/
me.userTipHide();
/** coauthoring end **/
@@ -1050,6 +1042,15 @@ define([
}
},
+ hideScreentip: function () {
+ this.screenTip.toolTip && this.screenTip.toolTip.hide();
+ this.screenTip.isVisible = false;
+ },
+
+ onMouseLeave: function () {
+ this.hideScreentip();
+ },
+
onMouseMoveStart: function() {
var me = this;
me.screenTip.isHidden = true;
@@ -1073,7 +1074,7 @@ define([
if (me.screenTip.isHidden && me.screenTip.isVisible) {
me.screenTip.isVisible = false;
me.isTooltipHiding = true;
- me.screenTip.toolTip.hide(function(){
+ me.screenTip.toolTip && me.screenTip.toolTip.hide(function(){
me.isTooltipHiding = false;
if (me.mouseMoveData) me.onMouseMove(me.mouseMoveData);
me.mouseMoveData = null;
@@ -1209,6 +1210,21 @@ define([
var recalc = false;
screenTip.isHidden = false;
+ if (!me.screenTip.toolTip) {
+ me.screenTip.toolTip = new Common.UI.Tooltip({
+ owner: me,
+ html: true,
+ title: '
Press Ctrl and click link',
+ cls: 'link-tooltip'
+ });
+ me.screenTip.toolTip.on('tooltip:show', function () {
+ $('#id_main_view').on('mouseleave', me.wrapEvents.onMouseLeave);
+ });
+ me.screenTip.toolTip.on('tooltip:hide',function () {
+ $('#id_main_view').off('mouseleave', me.wrapEvents.onMouseLeave);
+ });
+ }
+
if (type!==Asc.c_oAscMouseMoveDataTypes.Review && type!==Asc.c_oAscMouseMoveDataTypes.Placeholder)
ToolTip = Common.Utils.String.htmlEncode(ToolTip);