From: Teemu Suo-Anttila Date: Thu, 6 Feb 2014 14:34:22 +0000 (+0200) Subject: Change the way TestBenchSection in Debug Window stops finding mode. X-Git-Tag: 7.2.0.beta1~169^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=51a67370d2f329395edc56fef05838433f14073c;p=vaadin-framework.git Change the way TestBenchSection in Debug Window stops finding mode. Old one-shot picking replaced with new "pick elements until you click inside the debug window". Change-Id: I3ef3327f051f61187d83a66072805d0ceb3f3346 --- diff --git a/client/src/com/vaadin/client/debug/internal/SelectorPath.java b/client/src/com/vaadin/client/debug/internal/SelectorPath.java index b2f72ef34c..b8732e134e 100644 --- a/client/src/com/vaadin/client/debug/internal/SelectorPath.java +++ b/client/src/com/vaadin/client/debug/internal/SelectorPath.java @@ -130,7 +130,7 @@ public class SelectorPath { elementQueryString = queryFragment + elementQueryString; } - if (!path.startsWith("//")) { + if (!tmpPath.startsWith("//")) { elementQueryString = "$" + elementQueryString; } diff --git a/client/src/com/vaadin/client/debug/internal/TestBenchSection.java b/client/src/com/vaadin/client/debug/internal/TestBenchSection.java index 35c0d7abe8..5be75f2003 100644 --- a/client/src/com/vaadin/client/debug/internal/TestBenchSection.java +++ b/client/src/com/vaadin/client/debug/internal/TestBenchSection.java @@ -201,8 +201,6 @@ public class TestBenchSection implements Section { SelectorWidget w = new SelectorWidget(p); content.add(w); - - stopFind(); } private final NativePreviewHandler highlightModeHandler = new NativePreviewHandler() { @@ -222,6 +220,10 @@ public class TestBenchSection implements Section { .getNativeEvent().getClientX(), event.getNativeEvent() .getClientY()); if (VDebugWindow.get().getElement().isOrHasChild(eventTarget)) { + if (isFindMode() && event.getTypeInt() == Event.ONCLICK) { + stopFind(); + event.cancel(); + } return; }