]> source.dussan.org Git - vaadin-framework.git/commitdiff
Change the way TestBenchSection in Debug Window stops finding mode.
authorTeemu Suo-Anttila <teemusa@vaadin.com>
Thu, 6 Feb 2014 14:34:22 +0000 (16:34 +0200)
committerTeemu Suo-Anttila <teemusa@vaadin.com>
Thu, 6 Feb 2014 14:34:22 +0000 (16:34 +0200)
Old one-shot picking replaced with new "pick elements until you click
inside the debug window".

Change-Id: I3ef3327f051f61187d83a66072805d0ceb3f3346

client/src/com/vaadin/client/debug/internal/SelectorPath.java
client/src/com/vaadin/client/debug/internal/TestBenchSection.java

index b2f72ef34ccffd6a505a997866a25cd169211155..b8732e134e2b5a39eb65a228c3e0d3af5d183ee4 100644 (file)
@@ -130,7 +130,7 @@ public class SelectorPath {
             elementQueryString = queryFragment + elementQueryString;
         }
 
-        if (!path.startsWith("//")) {
+        if (!tmpPath.startsWith("//")) {
             elementQueryString = "$" + elementQueryString;
         }
 
index 35c0d7abe8c446def2bc7bb1ec52eac1599f3a92..5be75f2003abc2e0f7753477334f15fba3ca85b4 100644 (file)
@@ -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;
                 }