From c99ac74e86d3545cb3b580d73abcb582660808b6 Mon Sep 17 00:00:00 2001 From: Teemu Suo-Anttila Date: Tue, 19 Jun 2018 10:49:40 +0300 Subject: Fix TabSheet attaching and detaching components (#10988) This patch reverts the fix #10557 and replaces it with a proper solution from Grid perspective. Fixes #10987 Fixes #10985 --- .../java/com/vaadin/client/connectors/grid/EditorConnector.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'client') diff --git a/client/src/main/java/com/vaadin/client/connectors/grid/EditorConnector.java b/client/src/main/java/com/vaadin/client/connectors/grid/EditorConnector.java index 31803c235c..76a79693ca 100644 --- a/client/src/main/java/com/vaadin/client/connectors/grid/EditorConnector.java +++ b/client/src/main/java/com/vaadin/client/connectors/grid/EditorConnector.java @@ -72,8 +72,11 @@ public class EditorConnector extends AbstractExtensionConnector { @Override public void cancel() { - serverInitiated = true; - getParent().getWidget().cancelEditor(); + // Canceling an editor that is not open is a no-op. + if (getParent().getWidget().isEditorActive()) { + serverInitiated = true; + getParent().getWidget().cancelEditor(); + } } @Override -- cgit v1.2.3