diff options
author | Artur Signell <artur.signell@itmill.com> | 2011-03-24 10:29:59 +0000 |
---|---|---|
committer | Artur Signell <artur.signell@itmill.com> | 2011-03-24 10:29:59 +0000 |
commit | 24eccbb910ebdbccba22b8dbc14faef4e5e661a4 (patch) | |
tree | c527b80b167200ea9e9abdff2715b8c2967b9e80 /src/com/vaadin/terminal | |
parent | b879f52040e5c911df2220c6c1335dbda0411956 (diff) | |
download | vaadin-framework-24eccbb910ebdbccba22b8dbc14faef4e5e661a4.tar.gz vaadin-framework-24eccbb910ebdbccba22b8dbc14faef4e5e661a4.zip |
Potential fix for #6685 High CPU usage for any Vaadin application in IE9 - Moved v-app-loading class to separate div inside v-app
svn changeset:17907/svn branch:6.5
Diffstat (limited to 'src/com/vaadin/terminal')
-rw-r--r-- | src/com/vaadin/terminal/gwt/client/ui/VView.java | 7 | ||||
-rw-r--r-- | src/com/vaadin/terminal/gwt/server/AbstractApplicationServlet.java | 6 |
2 files changed, 10 insertions, 3 deletions
diff --git a/src/com/vaadin/terminal/gwt/client/ui/VView.java b/src/com/vaadin/terminal/gwt/client/ui/VView.java index 5d7cc18945..70b5388405 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VView.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VView.java @@ -675,6 +675,11 @@ public class VView extends SimplePanel implements Container, ResizeHandler, DOM.setElementProperty(getElement(), "tabIndex", "1"); RootPanel root = RootPanel.get(rootPanelId); + Element rootElement = root.getElement(); + if (rootElement.getChildCount() == 1) { + // Remove any "v-app-loading" div + rootElement.getChild(0).removeFromParent(); + } root.add(this); root.removeStyleName("v-app-loading"); @@ -708,7 +713,7 @@ public class VView extends SimplePanel implements Container, ResizeHandler, } public void focus() { - getElement().focus(); + getElement().focus(); } } diff --git a/src/com/vaadin/terminal/gwt/server/AbstractApplicationServlet.java b/src/com/vaadin/terminal/gwt/server/AbstractApplicationServlet.java index 5f06285b1f..a50cf3290a 100644 --- a/src/com/vaadin/terminal/gwt/server/AbstractApplicationServlet.java +++ b/src/com/vaadin/terminal/gwt/server/AbstractApplicationServlet.java @@ -1660,7 +1660,7 @@ public abstract class AbstractApplicationServlet extends HttpServlet implements + getDefaultTheme().replaceAll("[^a-zA-Z0-9]", ""); } - String classNames = "v-app v-app-loading " + themeClass + " " + String classNames = "v-app " + themeClass + " " + appClass; String divStyle = null; @@ -1744,7 +1744,9 @@ public abstract class AbstractApplicationServlet extends HttpServlet implements String appId, String classNames, String divStyle, HttpServletRequest request) throws IOException { page.write("<div id=\"" + appId + "\" class=\"" + classNames + "\" " - + (divStyle != null ? divStyle : "") + "></div>\n"); + + (divStyle != null ? divStyle : "") + ">"); + page.write("<div class=\"v-app-loading\"></div>"); + page.write("</div>\n"); page.write("<noscript>" + getNoScriptMessage() + "</noscript>"); } |