summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGülşah Köse <gulsah.kose@collabora.com>2024-04-18 16:50:07 +0300
committerGülşah Köse <gulsah.kose@collabora.com>2024-04-25 13:11:41 +0300
commitb99254cab68239305632c9536ce7380b894d332c (patch)
treec31fd449aa592845aa9a7f85b67f19ec24e85d50
parentiOS: stop keyboard pushing content offscreen (diff)
downloadonline-prevent-multitooltip-2.tar.gz
online-prevent-multitooltip-2.zip
Prevent opening multiple tooltip on drawing area widgets prevent-multitooltip-2
We see multiple tooltip problem on drawing area widgets. Example case: Add basic shape into a writer document Right click on shape and open Position and Size dialog Select the Rotation tab Hold the rotation angle widget and drag around itself When you inspect the "Rotation Angle" tooltip, count may be 600 We expect only 1. So we prevent to show another tooltip if we have already one. Signed-off-by: Gülşah Köse <gulsah.kose@collabora.com> Change-Id: I2f548f8c7afce8095e83a6faa3722e164f990210
-rw-r--r--browser/src/control/Control.UIManager.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/browser/src/control/Control.UIManager.js b/browser/src/control/Control.UIManager.js
index 5df804970a..3ae6dde64d 100644
--- a/browser/src/control/Control.UIManager.js
+++ b/browser/src/control/Control.UIManager.js
@@ -1712,8 +1712,12 @@ L.Control.UIManager = L.Control.extend({
enableTooltip: function(element) {
var elem = $(element);
if (window.mode.isDesktop()) {
- elem.tooltip();
- elem.click(function() {
+ if (this._tooltip) {
+ $('.ui-tooltip').remove();
+ this._tooltip = undefined;
+ }
+ this._tooltip = elem.tooltip();
+ elem.on('mousedown', function() {
$('.ui-tooltip').fadeOut(function() {
$(this).remove();
});