Make WordPress Core

Opened 5 years ago

Last modified 5 years ago

#45917 new enhancement

Twenty Nineteen: Consider adding a search option in the page header

Reported by: kjellr's profile kjellr Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version: 5.0.2
Component: Bundled Theme Keywords:
Focuses: javascript, multisite Cc:


Originally noted by @dartiss in the Twenty Nineteen GitHub repository:

Twenty Nineteen only has one widget area (in the page footer) and does not allow users to place a search field on the top of the page. Many users would likely benefit from that functionality, so it could be considered for a future release.

Change History (2)

#1 @laurelfulford
5 years ago

  • Type changed from defect (bug) to enhancement

#2 @craigtommola
5 years ago

  • Focuses javascript multisite added

Curious if this has been looked into further ... I'd suggest that there's a bug beneath the decision to leave out the search field. I'm working in a child theme of 2019 and added a search field both "long hand" and with get_search_form(). On pages which also have navigation (I'm working in a multisite network - some subsites do not have a menu / nav) the search won't work while within ... it loses focus when I try to insert my cursor.

In the event listeners tab of Chrome dev tools, /wp-content/themes/twentynineteen/js/touch-keyboard-navigation.js?ver=1.1 seems to be the culprit? If I comment out the wp_enqueue_script at /wp-content/themes/twentynineteen/functions.php:226 the search field works consistently.

I'm probably going to end up with a bunch of extraneous wrappers to sort this out, but if there's a more correct solution, it'd be much appreciated.

Note: See TracTickets for help on using tickets.