Saturday, August 31, 2013

Re: IE10 support in Gwt

Not sure if this is the place to add this but just wanted to pass on my finding related to IE10 browser support.

I ran into an issue with GWT cellTables and cellTrees using IE 10. When hovering over a row we used hovering styling for that row which worked fine.

However, if we stayed hovering over the row and the cellTree refreshed the hovering styling would disappear.

This was due to events like load and mouseover not firing for the cell widgets as it does with other browsers and lesser IE versions. I followed through the GWT code and found that since GWT cannot resolve the ie10 user.agent so the user.agent for ie6 is used.

I have verified this at many points in the code, but if you set a break point on line 36 in com.google.gwt.dom.client.DOMImplIE6 you will see first that this class is called and that isIE6Detected is set to true;

  static boolean isIE6() {

    if (!isIE6Detected) {

      isIE6 = isIE6Impl();

      isIE6Detected = true<!-- Line 36

    }

    return isIE6;

  }

I was thinking about the following two options, but am going to run them by more experienced members of our team.

Option #1

Since we are performing an upgrade to 2.5.1 now we could modify these 3 files to include an IE10 user agent and set it to fall back to IE8 as is IE9 currently in UserAgent.gwt.xml. They appear to be simple changes.

com.google.gwt.useragent.UserAgent.gwt.xml

com.google.gwt.useragent.rebind.UserAgentPropertyGenerator.java

com.google.gwt.user.DOM.gwt.xml

 

Option #2 (Admitted hack)

Since IE6 is no longer supported and IE10 is resolving to the IE6 user agent then this added to our Common.gwt.xml solves the problem and can be removed when a gwt support user agent IE10.

<replace-with class="com.google.gwt.dom.client.impl.DOMImplIE9">

       <when-type-is class="com.google.gwt.dom.client.impl.DOMImpl"/>

       <when-property-is name="user.agent" value="ie6"/>

</replace-with>



On Friday, April 26, 2013 4:13:16 PM UTC-4, Colin Alworth wrote:


In most cases that is true, but CssResource is an interesting exception. The fallback rules work by looking to see if there is no implementation for a particular value, and if not, looking to see if there *is* an implementation for some other value. In the case of ClientBundle and CssResource, they are generated at compile time - when you refer to @if user.agent ie9, that will be compiled *only* into the ie9 build, and not into any ie10 build, which will only contain non-qualified code or statements that actually evaluate to true for ie10.

But yes, otherwise it should behave as you've described.
On Monday, April 22, 2013 5:01:56 AM UTC-5, Honza Rames wrote:
It does but out of curiosity, if I add IE10 permutation/browser detection to UserAgent.gwt.xml to which value should I set the property-fallback? I mean is property fallback-recursive (I would assume it is) so setting it to IE9 should work? In case IE9 rule isn't specified it will recursively fallback to IE8 (and generate a compiler warning) right?

On Wednesday, April 17, 2013 12:40:04 AM UTC+2, Thomas Broyer wrote:


On Tuesday, April 16, 2013 2:07:34 PM UTC+2, Mariusz Magdziarz wrote:
When you add support for IE10??

AFAIK, IE10 works OK with the ie9 permutation.
Vaadin has started working on bringing MSPointerEvents to support touch-enabled (and touch-only) devices.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment