]> source.dussan.org Git - vaadin-framework.git/commitdiff
Merge remote branch 'origin/6.8'
authorLeif Åstrand <leif@vaadin.com>
Fri, 6 Jan 2012 10:39:16 +0000 (12:39 +0200)
committerLeif Åstrand <leif@vaadin.com>
Fri, 6 Jan 2012 10:39:16 +0000 (12:39 +0200)
Conflicts:
src/com/vaadin/data/validator/AbstractValidator.java
tests/testbench/com/vaadin/tests/components/textfield/TextChangeEventsWithNonImmediateValueChange.java

1  2 
src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java
src/com/vaadin/terminal/gwt/client/ui/VTextField.java
src/com/vaadin/ui/Window.java
tests/testbench/com/vaadin/tests/components/textfield/TextChangeEventsWithNonImmediateValueChange.java

index 9861222355b81f31e4e0edc81d880957bc3f194c,44ee7c11df19f234c853f17db3621b9361875d47..4d97e113f31ef44a30d25ebd296638875049a698
@@@ -294,17 -305,47 +305,18 @@@ public class VTextField extends TextBox
          setPrompting(inputPrompt != null && focusedTextField != this
                  && (text.equals("")));
  
 -        if (BrowserInfo.get().isFF3()) {
 -            /*
 -             * Firefox 3 is really sluggish when updating input attached to dom.
 -             * Some optimizations seems to work much better in Firefox3 if we
 -             * update the actual content lazily when the rest of the DOM has
 -             * stabilized. In tests, about ten times better performance is
 -             * achieved with this optimization. See for eg. #2898
 -             */
 -            Scheduler.get().scheduleDeferred(new Command() {
 -                public void execute() {
 -                    String fieldValue;
 -                    if (prompting) {
 -                        fieldValue = isReadOnly() ? "" : inputPrompt;
 -                        addStyleDependentName(CLASSNAME_PROMPT);
 -                    } else {
 -                        fieldValue = text;
 -                        removeStyleDependentName(CLASSNAME_PROMPT);
 -                    }
 -                    /*
 -                     * Avoid resetting the old value. Prevents cursor flickering
 -                     * which then again happens due to this Gecko hack.
 -                     */
 -                    if (!getText().equals(fieldValue)) {
 -                        setText(fieldValue);
 -                    }
 -                }
 -            });
 +        String fieldValue;
 +        if (prompting) {
 +            fieldValue = isReadOnly() ? "" : inputPrompt;
 +            addStyleDependentName(CLASSNAME_PROMPT);
          } else {
 -            String fieldValue;
 -            if (prompting) {
 -                fieldValue = isReadOnly() ? "" : inputPrompt;
 -                addStyleDependentName(CLASSNAME_PROMPT);
 -            } else {
 -                fieldValue = text;
 -                removeStyleDependentName(CLASSNAME_PROMPT);
 -            }
 -            setText(fieldValue);
 +            fieldValue = text;
 +            removeStyleDependentName(CLASSNAME_PROMPT);
          }
 +        setText(fieldValue);
  
          lastTextChangeString = valueBeforeEdit = text;
+         valueBeforeEditIsSynced = true;
      }
  
      protected void onCut() {
index a860d371b086aa1188890b0c25a1a92257c50c35,5f6c29f182d68e6034a14e94bb6700a2b9ddf06a..1b880bcb706c7d46aa149febfaaea7f656d683c7
@@@ -889,13 -2344,40 +889,37 @@@ public class Window extends Panel imple
       */
      @Override
      public void focus() {
 -        if (getParent() != null) {
 -            /*
 -             * When focusing a sub-window it basically means it should be
 -             * brought to the front. Instead of just moving the keyboard focus
 -             * we focus the window and bring it top-most.
 -             */
 -            bringToFront();
 -        } else {
 -            super.focus();
 -        }
 +        /*
 +         * When focusing a sub-window it basically means it should be brought to
 +         * the front. Instead of just moving the keyboard focus we focus the
 +         * window and bring it top-most.
 +         */
 +        super.focus();
 +        bringToFront();
      }
  
+     /**
+      * Notifies the child components and subwindows that the window is attached
+      * to the application.
+      */
+     @Override
+     public void attach() {
+         super.attach();
+         for (Window w : subwindows) {
+             w.attach();
+         }
+     }
+     /**
+      * Notifies the child components and subwindows that the window is detached
+      * from the application.
+      */
+     @Override
+     public void detach() {
+         super.detach();
+         for (Window w : subwindows) {
+             w.detach();
+         }
+     }
  }
index f44527bc1c1e6e2ea2afbb848bae7092a0e81db7,df5b275a8eb716f9566b62c45f7dd4efa39fc069..ab3fd49cd6256165ef2dc28384a70640512c7226
@@@ -33,7 -32,7 +32,7 @@@ public class TextChangeEventsWithNonImm
          tf.addListener(new ValueChangeListener() {
  
              public void valueChange(ValueChangeEvent event) {
-                 l.log("Value change:" + event.getProperty().getValue());
 -                l.log("Value change: '" + event.getProperty().toString() + "'");
++                l.log("Value change: '" + event.getProperty().getValue() + "'");
              }
          });
  
@@@ -52,4 -52,4 +52,4 @@@
          return 6866;
      }
  
--}
++}