Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Removing 'search' unused query selector

Open Beginner friendly
#8,822 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
1-3 hours
Newbie friendliness
85/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
javascript, jekyll
Domain
frontend, search

Research direction

In assets/js/current-projects.js, locate the two #search selectors named in the issue and remove them from the selector lists. Then test searches in desktop and mobile views on the Projects and Projects-Check pages, using Chrome DevTools device mode for mobile if helpful. Done means searches still work in both views on both pages.

Written by the indexing model from the issue text.

Description

Complexity: Small non-PR contribution P-Feature: Projects page ready for merge team role: back end/devOps size: 0.25pt
Overview

We need to remove query selectors for 'search' since there is no existing id for 'search' in '_includes/current-projects.html'

Action Items
  • locate the 2 instances of 'document.querySelector('#search')' in 'assets/js/current-projects.js'

  • make the following revisions to 'asstes/js/current-projects.js'
    Before:

    const allInputEl = Array.from(document.querySelectorAll('#search-desktop, #search-mobile, #search'));
    

    After removing #search:

    const allInputEl = Array.from(document.querySelectorAll('#search-desktop, #search-mobile'));
    

    Before:

    function searchCloseEventHandler(e){
        e.preventDefault();
        const input = document.querySelector('#search-desktop') || document.querySelector('#search-mobile') || document.querySelector('#search');
        if (input) input.value="";
    }
    

    After removing document.querySelector('#search'):

    function searchCloseEventHandler(e){
        e.preventDefault();
        const input = document.querySelector('#search-desktop') || document.querySelector('#search-mobile');
        if (input) input.value="";
    }
    
  • test and verify that the changes still work by performing a search in both mobile and desktop views on the Projects and Projects-Check pages

Resources/Instructions

Tutorial on Chrome's Dev Tools to test for mobile views: https://developer.chrome.com/docs/devtools/device-mode

Dominant language
JavaScript
Stars
364
Forks
871
Avg merge
4d 13h
Merged PRs (30d)
13

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from hackforla/website

All issues in hackforla/website

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.