diff --git a/django/contrib/admin/templates/admin/base.html b/django/contrib/admin/templates/admin/base.html index 1167c03dfa..479b6e743a 100644 --- a/django/contrib/admin/templates/admin/base.html +++ b/django/contrib/admin/templates/admin/base.html @@ -16,7 +16,7 @@ {% if LANGUAGE_BIDI %}<link rel="stylesheet" href="{% block stylesheet_rtl %}{% static "admin/css/rtl.css" %}{% endblock %}">{% endif %} {% block extrahead %}{% endblock %} {% block responsive %} - <meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1.0, maximum-scale=1.0"> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link rel="stylesheet" href="{% static "admin/css/responsive.css" %}"> {% if LANGUAGE_BIDI %}<link rel="stylesheet" href="{% static "admin/css/responsive_rtl.css" %}">{% endif %} {% endblock %} diff --git a/tests/admin_views/tests.py b/tests/admin_views/tests.py index 0a252bac4f..4db06ca84a 100644 --- a/tests/admin_views/tests.py +++ b/tests/admin_views/tests.py @@ -1505,6 +1505,13 @@ class AdminViewBasicTest(AdminViewBasicTestCase): response, '<div class="help" id="id_new_password1_helptext">' ) + def test_enable_zooming_on_mobile(self): + response = self.client.get(reverse("admin:index")) + self.assertContains( + response, + '<meta name="viewport" content="width=device-width, initial-scale=1.0">', + ) + @override_settings( AUTH_PASSWORD_VALIDATORS=[