ArcBees / gwtquery

A jQuery clone for GWT, and much more.
MIT License
85 stars 38 forks source link

fadeTo not working in IE10 with gwt2.5.1 and gwtquery 1.4.1-SNAPSHOT #258

Closed robert4os closed 8 years ago

robert4os commented 10 years ago

Works in Chrome, IE8 and IE9 but not in IE10

$("#divvv").fadeTo(0.5, null);

$("#divvv").css("opacity", "0.5"); does not work either though it works when setting it without gwtquery

keywords: fade, opacity

robert4os commented 10 years ago

The problem is in DocumentStyleImplIE:

public void setStyleProperty(Element e, String prop, String val) { if ("opacity".equals(prop)) { setOpacity(e, val); } else { super.setStyleProperty(e, prop, val); } }

In IE10 this exception rule does not work. But the default does, so this works: IE8, IE9 and IE10: public void setStyleProperty(Element e, String prop, String val) { if ("opacity".equals(prop) && (Window.Navigator.getUserAgent().contains("MSIE 8.0") || Window.Navigator.getUserAgent().contains("MSIE 9.0"))) { setOpacity(e, val); } else { _setStyleProperty(e, prop, val); } }

Deferred Binding a different ImplIE10 would be better but there is no ie10 in gwt2.5.1 yet.

manolo commented 10 years ago

which version of gQuery are you using?

On Sat, Jan 4, 2014 at 5:19 PM, robert4os notifications@github.com wrote:

The problem is in DocumentStyleImplIE:

public void setStyleProperty(Element e, String prop, String val) { if ("opacity".equals(prop)) { setOpacity(e, val); } else { super.setStyleProperty(e, prop, val); } }

In IE10 this exception rule does not work. But the default does, so this works: IE8, IE9 and IE10: public void setStyleProperty(Element e, String prop, String val) { if ("opacity".equals(prop)) { setOpacity(e, val); }

super.setStyleProperty(e, prop, val);

}

Deferred Binding a different ImplIE10 would be better but there is no ie10 in gwt2.5.1 yet.

— Reply to this email directly or view it on GitHubhttps://github.com/gwtquery/gwtquery/issues/258#issuecomment-31581850 .

manolo commented 10 years ago

Sorry I see the version in the subject

What happens if you set FX.css3 = false at the beginning ?

On Sat, Jan 4, 2014 at 11:10 PM, Manuel Carrasco Moñino manolo@apache.orgwrote:

which version of gQuery are you using?

On Sat, Jan 4, 2014 at 5:19 PM, robert4os notifications@github.comwrote:

The problem is in DocumentStyleImplIE:

public void setStyleProperty(Element e, String prop, String val) { if ("opacity".equals(prop)) { setOpacity(e, val); } else { super.setStyleProperty(e, prop, val); } }

In IE10 this exception rule does not work. But the default does, so this works: IE8, IE9 and IE10: public void setStyleProperty(Element e, String prop, String val) { if ("opacity".equals(prop)) { setOpacity(e, val); }

super.setStyleProperty(e, prop, val);

}

Deferred Binding a different ImplIE10 would be better but there is no ie10 in gwt2.5.1 yet.

— Reply to this email directly or view it on GitHubhttps://github.com/gwtquery/gwtquery/issues/258#issuecomment-31581850 .

robert4os commented 10 years ago

Fx.css=false makes no difference.

The problems seems to be that the css { filter: alpha(opacity=50) } ...which used to work for ie8 and ie9 does not work for ie10.

ie10 expects { opacity: 0.5 }

That's why the code in DocumentStyleImplIE does not work. See above.

best regards, Robert

jDramaix commented 10 years ago

The problem is that before GWT 2.6 there isn't a specific permutation for ie10 and so GWT used the ie9 permutation for running your app in ie10. Now that GWT has defined a ie10 permutation, it's now possible to fix that. But we have to think about keeping bacward compatibility with previous versions of GWT.

What you could do as workaround is to add this meta tag in your html :

<meta http-equiv="X-UA-Compatible" content="IE=7,8,9">
marekgregor commented 10 years ago

Hello, we have fixed similar issue, adding following code snippet in our .gwt.xml:

<generate-with class="com.google.gwt.query.rebind.SelectorGeneratorNativeIE9"> <when-type-assignable class="com.google.gwt.query.client.Selectors"/> <when-property-is name="user.agent" value="ie10"/> </generate-with> <replace-with class="com.google.gwt.query.client.impl.DocumentStyleImplIE"> <when-type-assignable class="com.google.gwt.query.client.impl.DocumentStyleImpl"/> <when-property-is name="user.agent" value="ie10"/> </replace-with> <replace-with class="com.google.gwt.query.client.impl.SelectorEngineSizzleIE"> <when-type-assignable class="com.google.gwt.query.client.impl.HasSelector"/> <when-property-is name="user.agent" value="ie10"/> </replace-with> <replace-with class="com.google.gwt.query.client.impl.SelectorEngineNative"> <when-type-assignable class="com.google.gwt.query.client.impl.SelectorEngineImpl"/> <when-property-is name="user.agent" value="ie10"/> </replace-with> <replace-with class="com.google.gwt.query.client.plugins.UiPlugin.GQueryUiImplTrident"> <when-type-is class="com.google.gwt.query.client.plugins.UiPlugin.GQueryUiImpl" /> <when-property-is name="user.agent" value="ie10"/> </replace-with>

based on details from https://github.com/gwtquery/gwtquery/blob/master/gwtquery-core/src/main/java/com/google/gwt/query/Query.gwt.xml

olafleur commented 8 years ago

This issue as no activity since more than a year. Feel free to reopen if it is still needed.