browser_support: Drop support for Internet Explorer.

Internet Explorer does not support `position: sticky` which improves
floating recipient bar behavior during scrolling which is one of the
issues blocking PR #9910.
IE also does not support some features that modern browsers support
hence may not super well.
This commit adds an error page that'll be displayed when a user logs
in from Internet Explorer. Also, a test is added.
This commit is contained in:
Dinesh
2020-04-20 17:30:03 +05:30
committed by Tim Abbott
parent 75b2264a3f
commit 2735860f01
5 changed files with 77 additions and 2 deletions

View File

@@ -6,6 +6,7 @@ from django.utils.translation import ugettext as _
from zerver.lib.response import json_error, json_success
from zerver.lib.user_agent import parse_user_agent
from zerver.signals import get_device_browser
from version import DESKTOP_MINIMUM_VERSION, DESKTOP_WARNING_VERSION
def pop_numerals(ver: str) -> Tuple[List[int], str]:
@@ -115,3 +116,9 @@ def is_outdated_desktop_app(user_agent_str: str) -> Tuple[bool, bool, bool]:
return (True, False, False)
return (False, False, False)
def is_unsupported_browser(user_agent: str) -> Tuple[bool, Optional[str]]:
browser_name = get_device_browser(user_agent)
if browser_name == "Internet Explorer":
return (True, browser_name)
return (False, browser_name)