help: Apply noscroll class on server side.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg 2020-07-13 18:03:36 -07:00 committed by Anders Kaseorg
parent 1244c066ad
commit 4b87a79a7e
3 changed files with 2 additions and 3 deletions

View File

@ -37,7 +37,7 @@
{% endblock %} {% endblock %}
</head> </head>
<body> <body class="{% if noscroll %}noscroll{% endif %}">
{% block content %} {% block content %}
{% endblock %} {% endblock %}

View File

@ -1,5 +1,6 @@
{% extends "zerver/portico-help.html" %} {% extends "zerver/portico-help.html" %}
{% set entrypoint = "help" %} {% set entrypoint = "help" %}
{% set noscroll = true %}
{# Zulip user and API documentation. #} {# Zulip user and API documentation. #}
{% block title %} {% block title %}

View File

@ -125,6 +125,4 @@ $(".markdown").on("click", () => {
render_code_sections(); render_code_sections();
$("body").addClass("noscroll");
$(".highlighted")[0]?.scrollIntoView({block: "center"}); $(".highlighted")[0]?.scrollIntoView({block: "center"});