Bug 1396517 - Undismisable tooltip after Guide Me menu
Summary: Undismisable tooltip after Guide Me menu
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: Frontend.WebAdmin
Version: 4.1.0
Hardware: All
OS: All
unspecified
low
Target Milestone: ovirt-4.1.0-beta
: 4.1.0.2
Assignee: Greg Sheremeta
QA Contact: Jiri Belka
URL:
Whiteboard:
: 1401581 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-11-18 14:24 UTC by Lukas Svaty
Modified: 2017-02-01 14:41 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-02-01 14:41:46 UTC
oVirt Team: UX
Embargoed:
rule-engine: ovirt-4.1+
rule-engine: planning_ack+
rule-engine: devel_ack+
gklein: testing_ack+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 68482 0 master MERGED userportal, webadmin: fix hanging tooltips on click 2016-12-15 14:34:03 UTC

Description Lukas Svaty 2016-11-18 14:24:13 UTC
Description of problem:
When adding entities with GuideMe menu, when we get to configure storage tooltip appears that cannot be dismissed until storage is added.

Version-Release number of selected component (if applicable):
4.1.0-0.0.master.20161117231327.gitdbe2e8a.el7.centos.noarch

How reproducible:
100%

Steps to Reproduce:
1. Click Guide Me
2. Click Configure Storage in the last step


Actual results:
Tooltip appears ', There should be at least 1 active host in the datacenter' even if there are active hosts.

Expected results:
Should appear only on hover over

Comment 1 Oved Ourfali 2016-11-20 06:32:39 UTC
Greg, please also check if 4.0 is affected.

Comment 2 Greg Sheremeta 2016-11-21 19:47:32 UTC
This is a typical issue that happens with tooltips. They are hidden when the mouse leaves an element. If you click and the click caused the element to leave the page, there is no way for the mouse to leave the element -- the element is gone.

To solve this in the past, IIRC, we globally listened for clicks and hid all tooltips upon any click.

@Vojtech, do you recall seeing this? How would you like me to approach solving this?

Comment 3 Vojtech Szocs 2016-11-22 16:43:05 UTC
(In reply to Greg Sheremeta from comment #2)
> This is a typical issue that happens with tooltips. They are hidden when the
> mouse leaves an element. If you click and the click caused the element to
> leave the page, there is no way for the mouse to leave the element -- the
> element is gone.
> 
> To solve this in the past, IIRC, we globally listened for clicks and hid all
> tooltips upon any click.

Before tooltip refactor, we had a global (GWT RootPanel) click handler to hide all tooltip instances, see [1] line 425.

[1] https://gerrit.ovirt.org/#/c/65566/17/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/tooltip/Tooltip.java

We need to add similar behavior to post-tooltip-refactor code.

> @Vojtech, do you recall seeing this? How would you like me to approach
> solving this?

One approach is to add equivalent global click handler that calls ElementTooltipUtils#hideAllTooltips. [Note that `hideAllTooltips` only affects tooltips whose DOM elements are currently attached to live DOM.]

Another approach is to modify WidgetTooltip: in decorateWidget method, add widget click handler that calls WidgetTooltip#hide.

I'd suggest to go with the former approach, which covers all kinds of tooltips (both ones created directly via ElementTooltipUtils & ones created via WidgetTooltip).

The class to host relevant code should reside in ElementTooltipUtils. [Also, please use RootLayoutPanel instead of RootPanel.]

Example code:

  // ElementTooltipUtils.java

  public static class TooltipHideOnRootPanelClick {

    public TooltipHideOnRootPanelClick() {
      RootLayoutPanel.get().addDomHandler(new ClickHandler() {
        @Override
        public void onClick(ClickEvent event) {
          ElementTooltipUtils.hideAllTooltips();
        }
      }, ClickEvent.getType());
    }

  }

To put above code into effect, bind it as eager singleton:

  // BaseSystemModule.java

  bind(ElementTooltipUtils.TooltipHideOnRootPanelClick.class).asEagerSingleton();

Comment 4 Greg Sheremeta 2016-12-14 01:44:54 UTC
*** Bug 1401581 has been marked as a duplicate of this bug. ***

Comment 5 Jiri Belka 2017-01-12 12:02:45 UTC
ok, ovirt-engine-webadmin-portal-4.1.0-0.4.master.20170111151514.git3d62579.el7.centos.noarch


Note You need to log in before you can comment on or make changes to this bug.