gwtquery icon indicating copy to clipboard operation
gwtquery copied to clipboard

Problem with CSS selector for IE10

Open nloke opened this issue 10 years ago • 4 comments

GWT version 2.5 and 2.6 GQuery 1.4.0 and 1.4.1

I am not sure if this is address in later versions of Gquery.

The following call failed.

$("[" + CustomID + "='" + uid + "']", htmlPanel).find("span span").first();

Below is the partial stacktrace for version 1.4.0.

com.google.web.bindery.event.shared.UmbrellaException: Exception caught (TypeError) @com.google.gwt.query.client.impl.SelectorEngineSizzle::select(Ljava/lang/String;Lcom/google/gwt/dom/client/Node;Lcom/google/gwt/core/client/JsArray;Lcom/google/gwt/core/client/JsArray;)([string: 'span span', JavaScript object(1254), JavaScript object(1280), null]): Object doesn't support property or method ''
...       
com.google.gwt.query.client.impl.SelectorEngineSizzle.select(SelectorEngineSizzle.java)
at com.google.gwt.query.client.impl.SelectorEngineSizzle.select(SelectorEngineSizzle.java:1114)
at com.google.gwt.query.client.impl.SelectorEngine.select(SelectorEngine.java:148)
at com.google.gwt.query.client.GQuery.select(GQuery.java:4137)
at com.google.gwt.query.client.GQuery.$(GQuery.java:363)
at com.google.gwt.query.client.GQuery.find(GQuery.java:2309)
...

For 1.4.1

at com.google.gwt.query.client.impl.SelectorEngineSizzle.select(SelectorEngineSizzle.java)
at com.google.gwt.query.client.impl.SelectorEngineSizzle.select(SelectorEngineSizzle.java:1114)
at com.google.gwt.query.client.impl.SelectorEngine.select(SelectorEngine.java:199)
at com.google.gwt.query.client.GQuery.select(GQuery.java:4140)
at com.google.gwt.query.client.GQuery.$(GQuery.java:355)
at com.google.gwt.query.client.GQuery.find(GQuery.java:2309)

nloke avatar Mar 31 '14 18:03 nloke

Indeed, it shouldn't use SizzleSelector with IE10.

jDramaix avatar Mar 31 '14 18:03 jDramaix

Is there a workaround for this at the moment?

jaltmanQ avatar Jun 11 '14 13:06 jaltmanQ

it should work with 1.4.2.

On Wed, Jun 11, 2014 at 3:25 PM, jaltman7 [email protected] wrote:

Is there a workaround for this at the moment?

— Reply to this email directly or view it on GitHub https://github.com/gwtquery/gwtquery/issues/277#issuecomment-45740052.

manolo avatar Jun 11 '14 23:06 manolo

This issue is still reproducible for me with GWT 2.6.1 and GQuery 1.4.2 in IE10

The call I make is:

 $(CUSTOM_CLASS + " a[class^=\"link\"]").addClass(DISABLED_LINK_CLASS).click(new Function() {
            @Override
            public boolean f(Event e) {
                return false;
            }
        });

and the error:

com.google.gwt.core.client.JavaScriptException: (TypeError) 
 description: Object doesn't support property or method ''
 number: -2146827850
 stack: TypeError: Object doesn't support property or method ''
   at GQS (https://jdev2.haufe-ep.de:38680/aurora/AC8B832EAB36CFAA741CE909A713C653.cache.html:25317:1892)
   at com_google_gwt_query_client_impl_SelectorEngineSizzle_select__Ljava_lang_String_2Lcom_google_gwt_dom_client_Node_2Lcom_google_gwt_core_client_JsArray_2Lcom_google_gwt_core_client_JsArray_2Lcom_google_gwt_core_client_JsArray_2 (https://jdev2.haufe-ep.de:38680/aurora/AC8B832EAB36CFAA741CE909A713C653.cache.html:8661:267)
   at com_google_gwt_query_client_impl_SelectorEngineSizzle_select__Ljava_lang_String_2Lcom_google_gwt_dom_client_Node_2Lcom_google_gwt_dom_client_NodeList_2 (https://jdev2.haufe-ep.de:38680/aurora/AC8B832EAB36CFAA741CE909A713C653.cache.html:25472:21107)
   at com_google_gwt_query_client_impl_SelectorEngine_$select__Lcom_google_gwt_query_client_impl_SelectorEngine_2Ljava_lang_String_2Lcom_google_gwt_dom_client_Node_2Lcom_google_gwt_dom_client_NodeList_2 (https://jdev2.haufe-ep.de:38680/aurora/AC8B832EAB36CFAA741CE909A713C653.cache.html:24899:5037)
   at com_google_gwt_query_client_GQuery_$select__Lcom_google_gwt_query_client_GQuery_2Ljava_lang_String_2Lcom_google_gwt_dom_client_Node_2Lcom_google_gwt_query_client_GQuery_2 (https://jdev2.haufe-ep.de:38680/aurora/AC8B832EAB36CFAA741CE909A713C653.cache.html:21939:217)
   at com_google_gwt_query_client_GQuery_$__Ljava_lang_String_2Lcom_google_gwt_dom_client_Node_2Lcom_google_gwt_query_client_GQuery_2 (https://jdev2.haufe-ep.de:38680/aurora/AC8B832EAB36CFAA741CE909A713C653.cache.html:22183:902)
   at com_google_gwt_query_client_GQuery_$__Ljava_lang_String_2Lcom_google_gwt_query_client_GQuery_2 (https://jdev2.haufe-ep.de:38680/aurora/AC8B832EAB36CFAA741CE909A713C653.cache.html:10355:169)


Later edit: It works with GQuery 1.4.3

adinaclaudia avatar Sep 23 '16 16:09 adinaclaudia