{"id":213,"date":"2013-02-26T23:11:28","date_gmt":"2013-02-26T23:11:28","guid":{"rendered":"http:\/\/www.corrspt.com\/blog\/?p=213"},"modified":"2013-02-26T23:13:23","modified_gmt":"2013-02-26T23:13:23","slug":"chrome-25-bug-extjs-2-2-datepicker-extreme-width","status":"publish","type":"post","link":"http:\/\/www.corrspt.com\/blog\/2013\/02\/26\/chrome-25-bug-extjs-2-2-datepicker-extreme-width\/","title":{"rendered":"Chrome 25 Bug &#8211; ExtJS 2.2 DatePicker extreme width"},"content":{"rendered":"<p>Hi everyone,<\/p>\n<p>Chrome 25 was released just a few days ago and apparently it has an issue with CSS rendering. I couldn&#8217;t find much more on this, but there are some <a title=\"Chrome 25 bug\" href=\"http:\/\/stackoverflow.com\/questions\/14711660\/jquerys-width-result-is-wrong-in-chrome-25-how-do-i-get-the-real-result\" target=\"_blank\">people<\/a> <a title=\"Chrome 25 Bug\" href=\"https:\/\/productforums.google.com\/forum\/?fromgroups=#!topic\/chrome\/94s52C4mmgo\" target=\"_blank\">complaining<\/a> I&#8217;ve found out about this because of an issue with the DatePicker widget in ExtJS 2.2 (the version XEO ships with). I went on and tested Chrome with ExtJS 3 and 4 but the issue it not present.<\/p>\n<p>This is what happens when you click on the DatePicker widget with Chrome 25<\/p>\n<div id=\"attachment_214\" style=\"width: 914px\" class=\"wp-caption alignleft\"><a href=\"http:\/\/www.corrspt.com\/blog\/wp-content\/uploads\/2013\/02\/Chrome25.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-214\" class=\"size-full wp-image-214\" alt=\"Chrome 25 DatePicker\" src=\"http:\/\/www.corrspt.com\/blog\/wp-content\/uploads\/2013\/02\/Chrome25.png\" width=\"904\" height=\"219\" srcset=\"http:\/\/www.corrspt.com\/blog\/wp-content\/uploads\/2013\/02\/Chrome25.png 904w, http:\/\/www.corrspt.com\/blog\/wp-content\/uploads\/2013\/02\/Chrome25-300x72.png 300w, http:\/\/www.corrspt.com\/blog\/wp-content\/uploads\/2013\/02\/Chrome25-500x121.png 500w\" sizes=\"auto, (max-width: 904px) 100vw, 904px\" \/><\/a><p id=\"caption-attachment-214\" class=\"wp-caption-text\">Chrome 25 DatePicker<\/p><\/div>\n<p>What happens is that when doing width calculations, there are some issues when <strong>width:100%<\/strong> is used, I can&#8217;t pin-point the situation exactly, but basically the DatePicket gets a width of more than 10.000 px wide. I found this to solve my problems with the DatePicker, so if you suffer from the same problem, use it:<\/p>\n<pre class=\"brush:css\">\/* Chrome25 Bug fix, 100% width causes issues with the date picker, replaced with a fixed width*\/\r\ntable.x-date-inner {\r\n   width:200px !important; \/* original was width : 100% *\/\r\n}<\/pre>\n<p>Just add this to a CSS your application uses, or replace the one in ExtJS. Hope it helps, I had to dig a lot in ExtJS source (and debugging in Google Chrome) to find out what was happening to produce a such a strange effect (that was not present in version 24).<\/p>\n<p>Happy coding!<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hi everyone, Chrome 25 was released just a few days ago and apparently it has an issue with CSS rendering. I couldn&#8217;t find much more on this, but there are some people complaining I&#8217;ve found out about this because of &hellip; <a href=\"http:\/\/www.corrspt.com\/blog\/2013\/02\/26\/chrome-25-bug-extjs-2-2-datepicker-extreme-width\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[],"class_list":["post-213","post","type-post","status-publish","format-standard","hentry","category-web-development"],"_links":{"self":[{"href":"http:\/\/www.corrspt.com\/blog\/wp-json\/wp\/v2\/posts\/213","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.corrspt.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.corrspt.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.corrspt.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.corrspt.com\/blog\/wp-json\/wp\/v2\/comments?post=213"}],"version-history":[{"count":3,"href":"http:\/\/www.corrspt.com\/blog\/wp-json\/wp\/v2\/posts\/213\/revisions"}],"predecessor-version":[{"id":216,"href":"http:\/\/www.corrspt.com\/blog\/wp-json\/wp\/v2\/posts\/213\/revisions\/216"}],"wp:attachment":[{"href":"http:\/\/www.corrspt.com\/blog\/wp-json\/wp\/v2\/media?parent=213"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.corrspt.com\/blog\/wp-json\/wp\/v2\/categories?post=213"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.corrspt.com\/blog\/wp-json\/wp\/v2\/tags?post=213"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}