Skip to content

Commit

Permalink
Merge pull request 'Fix Bug 70705' (#65) from fix/bugfix into release…
Browse files Browse the repository at this point in the history
…/v8.2.0
  • Loading branch information
Julia Radzhabova committed Oct 4, 2024
2 parents 4ade9c4 + 702e792 commit 4e49664
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 13 deletions.
10 changes: 10 additions & 0 deletions apps/documenteditor/forms/app/controller/ApplicationController.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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() {
Expand Down
42 changes: 29 additions & 13 deletions apps/documenteditor/main/app/controller/DocumentHolder.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,13 +129,6 @@ define([
me.showMathTrackOnLoad = false;

me.screenTip = {
toolTip: new Common.UI.Tooltip({
owner: this,
html: true,
title: '<br><b>Press Ctrl and click link</b>',
cls: 'link-tooltip'
// style: 'word-wrap: break-word;'
}),
strTip: '',
isHidden: true,
isVisible: false
Expand All @@ -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 = {};
Expand All @@ -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 **/
Expand All @@ -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 **/
Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -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: '<br><b>Press Ctrl and click link</b>',
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);

Expand Down

0 comments on commit 4e49664

Please sign in to comment.