{"id":6123,"date":"2012-07-30T12:04:00","date_gmt":"2012-07-30T11:04:00","guid":{"rendered":"http:\/\/touk.pl\/blog\/?guid=6595e5b4b7c2fbc343311fb9e52d9795"},"modified":"2022-07-26T12:58:26","modified_gmt":"2022-07-26T10:58:26","slug":"gwt-has-bug-in-dev-mode-for-chrome","status":"publish","type":"post","link":"https:\/\/touk.pl\/blog\/2012\/07\/30\/gwt-has-bug-in-dev-mode-for-chrome\/","title":{"rendered":"GWT has bug in Dev mode for Chrome"},"content":{"rendered":"<p>It happens when trying to check visibility of component. So be careful with<br \/>\n<em>component.isVisible()<\/em><br \/>\nas it fails on Chrome.<\/p>\n<p>Same thing is for GXT (<a href=\"http:\/\/www.sencha.com\/products\/gxt\/\">extgwt from Sencha<\/a>) as it calls underlaying GWT&#8217;s\u00a0isVisible()<\/p>\n<p><em>(UncaughtExceptionHandler.java:23) 2012-07-30 12:55:02,147 [ERROR] java.lang.ClassCastException: java.lang.String cannot be cast to com.google.gwt.dom.client.Element<\/em><br \/>\n<em>java.lang.ClassCastException:<\/em><br \/>\n<em>java.lang.String cannot be cast to com.google.gwt.dom.client.Element<\/em><br \/>\n<em>\u00a0 \u00a0 at com.google.gwt.dom.client.DOMImpl.getParentElement(DOMImpl.java)<\/em><br \/>\n<em>\u00a0 \u00a0 at com.google.gwt.dom.client.Node$.getParentElement$(Node.java:184)<\/em><br \/>\n<em>\u00a0 \u00a0 at com.google.gwt.user.client.DOM.getParent(DOM.java:892)<\/em><br \/>\n<em>\u00a0 \u00a0 at com.extjs.gxt.ui.client.core.El.getParent(El.java:1274)<\/em><br \/>\n<em>\u00a0 \u00a0 at com.extjs.gxt.ui.client.core.El.isVisible(El.java:1889)<\/em><br \/>\n<em>\u00a0 \u00a0 at com.extjs.gxt.ui.client.core.El.isVisible(El.java:1874)<\/em><br \/>\n<em>\u00a0 \u00a0 at com.extjs.gxt.ui.client.core.El.isVisible(El.java:1898)<\/em><br \/>\n<em>\u00a0 \u00a0 at com.extjs.gxt.ui.client.widget.Component.isVisible(Component.java:767)<\/em><br \/>\n<em>\u00a0 \u00a0 at com.extjs.gxt.ui.client.widget.Component.isVisible(Component.java:754)<\/em><br \/>\n<em>\u00a0 \u00a0 at pl.touk.mnp.frontend.webapp.client.widgets.RichDateComboFilter.handleBeforeLoadEvent(RichDateComboFilter.java:258)<\/em><\/p>\n<div>\n  \n<\/div>\n<div>\n  When using development mode, better use Firefox. In production Chrome works well without bugs.<\/p>\n<p><b>EDIT:<\/b><br \/>When using shallow visibility checking<br \/><i>component.isVisible(false);<\/i><br \/>the error can be avoided. GWT isn&#8217;t traversing through DOM tree and it doesn&#8217;t blow with an exception but you have to check whether shallow visibility checking is sufficient (in most cases it is).\n<\/div>\n","protected":false},"excerpt":{"rendered":"It happens when trying to check visibility of component. So be careful withcomponent.isVisible()as it fails on Chrome.Same thing is for GXT (extgwt from Sencha) as it calls underlaying GWT&#8217;s&nbsp;isVisible()(UncaughtExceptionHandler.java:23) 2012-07-30&#8230;\n","protected":false},"author":22,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[71,28,68],"class_list":{"0":"post-6123","1":"post","2":"type-post","3":"status-publish","4":"format-standard","6":"category-development-design","7":"tag-frontend","8":"tag-gwt","9":"tag-java"},"_links":{"self":[{"href":"https:\/\/touk.pl\/blog\/wp-json\/wp\/v2\/posts\/6123","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/touk.pl\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/touk.pl\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/touk.pl\/blog\/wp-json\/wp\/v2\/users\/22"}],"replies":[{"embeddable":true,"href":"https:\/\/touk.pl\/blog\/wp-json\/wp\/v2\/comments?post=6123"}],"version-history":[{"count":10,"href":"https:\/\/touk.pl\/blog\/wp-json\/wp\/v2\/posts\/6123\/revisions"}],"predecessor-version":[{"id":14324,"href":"https:\/\/touk.pl\/blog\/wp-json\/wp\/v2\/posts\/6123\/revisions\/14324"}],"wp:attachment":[{"href":"https:\/\/touk.pl\/blog\/wp-json\/wp\/v2\/media?parent=6123"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/touk.pl\/blog\/wp-json\/wp\/v2\/categories?post=6123"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/touk.pl\/blog\/wp-json\/wp\/v2\/tags?post=6123"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}