Bug 1396517
| Summary: | Undismisable tooltip after Guide Me menu | ||
|---|---|---|---|
| Product: | [oVirt] ovirt-engine | Reporter: | Lukas Svaty <lsvaty> |
| Component: | Frontend.WebAdmin | Assignee: | Greg Sheremeta <gshereme> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Jiri Belka <jbelka> |
| Severity: | low | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 4.1.0 | CC: | bugs, gklein, jbelka, lleistne, oourfali, vszocs |
| Target Milestone: | ovirt-4.1.0-beta | Flags: | rule-engine:
ovirt-4.1+
rule-engine: planning_ack+ rule-engine: devel_ack+ gklein: testing_ack+ |
| Target Release: | 4.1.0.2 | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2017-02-01 14:41:46 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | UX | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Lukas Svaty
2016-11-18 14:24:13 UTC
Greg, please also check if 4.0 is affected. 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? (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(); *** Bug 1401581 has been marked as a duplicate of this bug. *** ok, ovirt-engine-webadmin-portal-4.1.0-0.4.master.20170111151514.git3d62579.el7.centos.noarch |