From: Leif Åstrand Date: Fri, 6 Jan 2012 10:39:16 +0000 (+0200) Subject: Merge remote branch 'origin/6.8' X-Git-Tag: 7.0.0.alpha2~541^2~2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=e887c06e07aa3f3ec1765196af51bd82a5fb4f46;p=vaadin-framework.git Merge remote branch 'origin/6.8' Conflicts: src/com/vaadin/data/validator/AbstractValidator.java tests/testbench/com/vaadin/tests/components/textfield/TextChangeEventsWithNonImmediateValueChange.java --- e887c06e07aa3f3ec1765196af51bd82a5fb4f46 diff --cc src/com/vaadin/terminal/gwt/client/ui/VTextField.java index 9861222355,44ee7c11df..4d97e113f3 --- a/src/com/vaadin/terminal/gwt/client/ui/VTextField.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VTextField.java @@@ -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() { diff --cc src/com/vaadin/ui/Window.java index a860d371b0,5f6c29f182..1b880bcb70 --- a/src/com/vaadin/ui/Window.java +++ b/src/com/vaadin/ui/Window.java @@@ -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(); + } + } + } diff --cc tests/testbench/com/vaadin/tests/components/textfield/TextChangeEventsWithNonImmediateValueChange.java index f44527bc1c,df5b275a8e..ab3fd49cd6 --- a/tests/testbench/com/vaadin/tests/components/textfield/TextChangeEventsWithNonImmediateValueChange.java +++ b/tests/testbench/com/vaadin/tests/components/textfield/TextChangeEventsWithNonImmediateValueChange.java @@@ -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; } --} ++}