Google Groups Home
Help | Sign in
Message from discussion webtoolkit and IE7
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
jack.tang  
View profile
 More options May 21 2006, 6:54 am
From: "jack.tang" <him...@gmail.com>
Date: Sun, 21 May 2006 10:54:36 -0000
Local: Sun, May 21 2006 6:54 am
Subject: Re: webtoolkit and IE7
I have no ie7 in my hands. But i think maybe it is easy to hack this.

You can find UserAgent.gwt.xml in gwt-user.jar. Below is the content.
<!--
    -->
<!-- Copyright 2006 Google Inc. All Rights Reserved.
    -->
<!-- Defines the user.agent property and its provider function.
    -->
<!--
    -->
<!-- This module is typically inherited via com.google.gwt.user.User.
     -->
<!--
    -->
<module>

        <!-- Browser-sensitive code should use the 'user.agent' property -->
        <define-property name="user.agent"
values="ie6,moz,oldmoz,safari,opera"/>

        <property-provider name="user.agent"><![CDATA[
      var ua = navigator.userAgent.toLowerCase();
      if (ua.indexOf("opera") != -1) {
        return "opera";
      }
      else if (ua.indexOf("safari") != -1) {
        return "safari";
      }
      else if (ua.indexOf("msie 6.0") != -1) {
        return "ie6";
          }
      else if (ua.indexOf("mozilla") != -1) {
          var geckoIdx = ua.indexOf("gecko/");
          if (geckoIdx == -1)
                return "oldmoz";

          var spaceIdx = ua.indexOf(" ", geckoIdx);
          if (spaceIdx == -1)
                spaceIdx = ua.length;

          var version = parseInt(ua.substring(geckoIdx + 6, spaceIdx));
          if (version < 20051107) // Firefox1.5's Gecko version
                return "oldmoz";
          return "moz";
      }
      return "unknown";
        ]]></property-provider>

</module>

try to change this line
      else if (ua.indexOf("msie 6.0") != -1) {
 to
      else if(ua.indexOf("msie 6.0") != -1 || ua.indexOf("msie 7.0") !=
-1  )

Hope it helps


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google