From 0af3e7806169fea7c1cd7ef30fea35ebfdcf1cd7 Mon Sep 17 00:00:00 2001
From: Shane Tomlinson <stomlinson@mozilla.com>
Date: Mon, 18 Jun 2012 19:32:10 +0100
Subject: [PATCH] Fix chrome showing a blank screen on resizing to exactly
 640px.

issue #1548
---
 resources/static/dialog/css/m.css                      | 3 +++
 resources/static/dialog/resources/screen_size_hacks.js | 5 ++++-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/resources/static/dialog/css/m.css b/resources/static/dialog/css/m.css
index 2a757809b..666f1d147 100644
--- a/resources/static/dialog/css/m.css
+++ b/resources/static/dialog/css/m.css
@@ -2,6 +2,9 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
+/* If the max-width changes, the size given in screen_size_hacks.js must be
+ * updated as well.
+ */
 @media screen and (max-width: 640px) {
 
   header, footer {
diff --git a/resources/static/dialog/resources/screen_size_hacks.js b/resources/static/dialog/resources/screen_size_hacks.js
index 33685cb75..5918d5008 100644
--- a/resources/static/dialog/resources/screen_size_hacks.js
+++ b/resources/static/dialog/resources/screen_size_hacks.js
@@ -12,7 +12,10 @@
         signInEl = $("#signIn");
 
     selectEmailEl.css("position", "static");
-    if($(window).width() >= 640) {
+
+    // The mobile breakpoint is 640px in the CSS.  If the max-width is changed
+    // there, it must be changed here as well.
+    if($(window).width() > 640) {
       // First, remove the mobile hacks
       selectEmailEl.css("width", "");
       contentEl.css("min-height", "");
-- 
GitLab