diff --git a/sphinx/templates/modindex.html b/sphinx/templates/modindex.html
index 2460f0fd6..05ebc5ade 100644
--- a/sphinx/templates/modindex.html
+++ b/sphinx/templates/modindex.html
@@ -1,7 +1,7 @@
{% extends "layout.html" %}
{% set title = _('Global Module Index') %}
{% block extrahead %}
-{% if collapse_modindex %}
+{% if builder != 'htmlhelp' and collapse_modindex %}