From ec563bab32daf28e7b1329975a001b1701c117a3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Johannes=20Dahlstr=C3=B6m?= Date: Wed, 23 Jan 2013 10:55:49 +0200 Subject: [PATCH] Disable Form tooltips, as Form shows both description and component error as a part of the layout (#10784) Change-Id: Ia5af801e099e997ae25cfcf25434c8542da75a48 --- .../vaadin/client/ui/form/FormConnector.java | 11 +-- .../tests/components/form/FormTooltips.html | 91 +++---------------- 2 files changed, 18 insertions(+), 84 deletions(-) diff --git a/client/src/com/vaadin/client/ui/form/FormConnector.java b/client/src/com/vaadin/client/ui/form/FormConnector.java index b87faf7b30..22277b6974 100644 --- a/client/src/com/vaadin/client/ui/form/FormConnector.java +++ b/client/src/com/vaadin/client/ui/form/FormConnector.java @@ -26,7 +26,6 @@ import com.vaadin.client.LayoutManager; import com.vaadin.client.Paintable; import com.vaadin.client.TooltipInfo; import com.vaadin.client.UIDL; -import com.vaadin.client.Util; import com.vaadin.client.ui.AbstractComponentContainerConnector; import com.vaadin.client.ui.Icon; import com.vaadin.client.ui.ShortcutActionHandler; @@ -228,12 +227,8 @@ public class FormConnector extends AbstractComponentContainerConnector @Override public TooltipInfo getTooltipInfo(Element element) { - if (Util.getConnectorForElement(getConnection(), getWidget() - .getParent(), (com.google.gwt.user.client.Element) element - .cast()) != this) { - // Do not show tooltips when hovering over child fields - return null; - } - return super.getTooltipInfo(element); + // Form shows its description and error message + // as a part of the actual layout + return null; } } diff --git a/uitest/src/com/vaadin/tests/components/form/FormTooltips.html b/uitest/src/com/vaadin/tests/components/form/FormTooltips.html index 0d069efb0b..ee693fd4be 100644 --- a/uitest/src/com/vaadin/tests/components/form/FormTooltips.html +++ b/uitest/src/com/vaadin/tests/components/form/FormTooltips.html @@ -3,13 +3,13 @@ - -New Test + +FormTooltips - + @@ -68,97 +68,36 @@ - + - - - - - - - - - - - - - - - - - + + - - + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - + + @@ -169,7 +108,7 @@ - + @@ -185,7 +124,7 @@ - + -- 2.39.5
New Test
FormTooltips
openvaadin=runcomvaadintestscomponentsformFormTooltips::Root/VTooltip[0]/FlowPanel[0]/domChild[1]
showTooltip vaadin=runcomvaadintestscomponentsformFormTooltips::/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[0]/VForm[0]/domChild[0]/domChild[1]
waitForElementPresentvaadin=runcomvaadintestscomponentsformFormTooltips::Root/VTooltip[0]/FlowPanel[0]/domChild[1]
assertTextvaadin=runcomvaadintestscomponentsformFormTooltips::Root/VTooltip[0]/FlowPanel[0]/VErrorMessage[0]/HTML[0]/domChild[0]Form error
assertTextvaadin=runcomvaadintestscomponentsformFormTooltips::Root/VTooltip[0]/FlowPanel[0]/domChild[1]Some description
mouseMovevaadin=runcomvaadintestscomponentsformFormTooltips::pause1000
waitForElementNotPresentvaadin=runcomvaadintestscomponentsformFormTooltips::Root/VTooltip[0]/FlowPanel[0]/domChild[1]assertElementNotPresentvaadin=runcomvaadintestscomponentsformFormTooltips::Root/VTooltip[0]
showTooltip vaadin=runcomvaadintestscomponentsformFormTooltips::/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[0]/VForm[0]/domChild[0]/domChild[3]/domChild[0]/domChild[0]
waitForElementPresentvaadin=runcomvaadintestscomponentsformFormTooltips::Root/VTooltip[0]/FlowPanel[0]/domChild[1]
assertTextvaadin=runcomvaadintestscomponentsformFormTooltips::Root/VTooltip[0]/FlowPanel[0]/VErrorMessage[0]/HTML[0]/domChild[0]Form error
assertTextvaadin=runcomvaadintestscomponentsformFormTooltips::Root/VTooltip[0]/FlowPanel[0]/domChild[1]Some description
mouseMovevaadin=runcomvaadintestscomponentsformFormTooltips::
waitForElementNotPresentvaadin=runcomvaadintestscomponentsformFormTooltips::Root/VTooltip[0]/FlowPanel[0]/domChild[1]
showTooltipvaadin=runcomvaadintestscomponentsformFormTooltips::/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[0]/VForm[0]/domChild[0]/domChild[3]
waitForElementPresentvaadin=runcomvaadintestscomponentsformFormTooltips::Root/VTooltip[0]/FlowPanel[0]/domChild[1]
assertTextvaadin=runcomvaadintestscomponentsformFormTooltips::Root/VTooltip[0]/FlowPanel[0]/VErrorMessage[0]/HTML[0]/domChild[0]Form error
assertTextvaadin=runcomvaadintestscomponentsformFormTooltips::Root/VTooltip[0]/FlowPanel[0]/domChild[1]Some description
mouseMovevaadin=runcomvaadintestscomponentsformFormTooltips::pause1000
waitForElementNotPresentvaadin=runcomvaadintestscomponentsformFormTooltips::Root/VTooltip[0]/FlowPanel[0]/domChild[1]assertElementNotPresentvaadin=runcomvaadintestscomponentsformFormTooltips::Root/VTooltip[0]
pause3001000
pause3001000