mirror of
https://github.com/zulip/zulip.git
synced 2025-11-07 15:33:30 +00:00
So, in Firefox, $(window).width() does not include the width of the scrollbar. However, the CSS media-query max-width DOES include the width of the scrollbar -- so the Bootstrap change and our change do not happen at the same time. window.innerWidth does take into account the width of the scrollbar, though, and seems to have reasonable cross-browser support, so we use that instead. (If we wanted to be slicker, we could use a media query a la https://developer.mozilla.org/en-US/docs/DOM/window.matchMedia , but that's not supported in IE <10.) This resolves Trac #35. (imported from commit ca35321c02d5e79e4f9c439a662805c016a333ed)
18 KiB
18 KiB