-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Open
Description
The hotkey, CMD + K, to focus on the search input element, seemingly has no affect on desktop. But works fine on mobile.
Commit e81dd71 adds two search fields to the DOM, one displayed only on mobile.
--- a/djangoproject/templates/includes/header.html
+++ b/djangoproject/templates/includes/header.html
@@ -5,8 +6,11 @@
<div class="container container--flex--wrap--mobile">
<a class="logo" href="{% url 'homepage' %}">Django</a>
<p class="meta">The web framework for perfectionists with deadlines.</p>
- <div class="mobile-toggle">
- {% include "includes/toggle_theme.html" %}
+ <div class="header-mobile-only">
+ {% search_form %}
+ <div class="light-dark-mode-toggle">
+ {% include "includes/toggle_theme.html" %}
+ </div>
</div>
<button class="menu-button">
<i class="icon icon-reorder"></i>
@@ -42,6 +46,9 @@
<li{% if 'fundraising' in request.path %} class="active"{% endif %}>
<a href="{% url 'fundraising:index' %}">♥ Donate</a>
</li>
+ <li>
+ {% search_form %}
+ </li>
<li>
{% include "includes/toggle_theme.html" %}
</li>The selector for the search-focus event listener returns the first search input element, and not the element displayed on desktop.
const el = document.querySelector('#id_q');sarahboyce
Metadata
Metadata
Assignees
Labels
No labels