From 1cf0ee0baeada05463a8f6445834cdea3a71876a Mon Sep 17 00:00:00 2001 From: anoshenko Date: Sun, 7 May 2023 20:58:51 +0300 Subject: [PATCH] Bug fixing --- appWasm.go | 1 - app_scripts.js | 13 ++++++++----- application.go | 2 +- session.go | 2 +- sessionUtils.go | 2 ++ view.go | 2 ++ 6 files changed, 14 insertions(+), 8 deletions(-) diff --git a/appWasm.go b/appWasm.go index 8feefbd..0b66622 100644 --- a/appWasm.go +++ b/appWasm.go @@ -149,7 +149,6 @@ func (app *wasmApp) init(params AppParams) { div = document.Call("createElement", "div") div.Set("className", "ruiPopupLayer") div.Set("id", "ruiPopupLayer") - div.Set("onclick", "clickOutsidePopup(event)") div.Set("style", "visibility: hidden;") body.Call("appendChild", div) diff --git a/app_scripts.js b/app_scripts.js index 173df95..c764031 100644 --- a/app_scripts.js +++ b/app_scripts.js @@ -1253,11 +1253,6 @@ function loadInlineImage(url, content) { img.src = content; } -function clickOutsidePopup(e) { - sendMessage("clickOutsidePopup{session=" + sessionID + "}") - e.stopPropagation(); -} - function clickClosePopup(element, e) { var popupId = element.getAttribute("data-popupId"); sendMessage("clickClosePopup{session=" + sessionID + ",id=" + popupId + "}") @@ -2072,6 +2067,14 @@ function mouseLeaveEvent(element, event) { sendMessage("mouse-leave{session=" + sessionID + ",id=" + element.id + mouseEventData(element, event) + "}"); } +function hideTooltip() { + const layer = document.getElementById("ruiTooltipLayer"); + if (layer) { + layer.style.opacity = 0; + layer.style.visibility = "hidden"; + } +} + function stopEventPropagation(element, event) { event.stopPropagation(); } diff --git a/application.go b/application.go index e5b3046..bd6e910 100644 --- a/application.go +++ b/application.go @@ -75,7 +75,7 @@ func getStartPage(buffer *strings.Builder, params AppParams, addScripts string)
- +