[BUG]: Allow Backspace in Organisation Search Chip

Offen
#458 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

@Rusky-1014 arbeitet bereits daran.

Seit 14.11.2026.

  • #459 von @Rusky-1014 — offen

Bewertung

Schwierigkeit
2/5
Geschätzter Aufwand
1-3 Stunden
Anfängerfreundlichkeit
35/100
Issue-Typ
Bug
Klarheit
Klar beschrieben
Aktivitätsstatus
Aktiv
Tech-Stack
javascript, react
Bereich
frontend

Rechercherichtung

The chip logic lives in src/pages/HomePage.jsx: the Backspace handler around lines 45-47 deletes the last chip with slice, and the chip render around lines 85-94 has no click handler. Start by reading those two spots and the removeChip helper. Done means Backspace on an empty input moves the last chip's text back into the input, and clicking a chip does the same. Note that PR #459 is already open against this issue, so check it before starting.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

bug
Bug Description

Bug Description :

  1. If the user makes a typo (e.g. AOSSIE-Orgg), there is no way to edit the text in place. The user must click the x delete button, which removes the chip entirely, requiring them to retype the full name from scratch.
  2. When the text input is empty and the user presses Backspace, the previous chip is permanently deleted instead of restoring its text into the input field for easy correction.

Proposed Solution :

  1. When 'Backspaceis pressed, pop the last chip and load its string value directly into theinput` field so the user can immediately edit it without retyping.
  2. Clicking on an existing chip should remove it from the chips list and populate the input field with its value, focusing the input for quick modification.
Steps to Reproduce
  1. Navigate to the HomePage (/).
  2. In the search bar, type an organization name with a typo (e.g. AOSSIE-Orgg) and press Enter to create a chip.
  3. Try to click or double-click the chip to edit it — observe that it is non-editable.
  4. Click the x icon on the chip — observe that the chip is deleted completely, and the user must re-enter the entire name.
  5. Alternatively, add a chip, ensure the text input is empty, and press Backspace — observe that the chip is permanently deleted rather than populated back into the input for correction.
Logs and Screenshots

In src/pages/HomePage.jsx:

Lines 45–47 handle Backspace:

if (e.key === 'Backspace' && !input && chips.length) {
  setChips(prev => prev.slice(0, -1)) // Permanently deletes the chip
}

Lines 85–94 render chips as static non-interactive elements:

{chips.map(c => (
  <span key={c} style={{ ... }}>
    {c}
    <FiX size={12} style={{ cursor: 'pointer', opacity: .7 }} onClick={() => removeChip(c)} />
  </span>
))}

Expected Behavior:

  • Pressing Backspace when input is empty should pop the last chip and place its text back into input for editing.
  • Clicking on a chip should remove it from the chips list and load its string into the input field for instant editing.
Environment Details
  • Browser: Any (Chrome / Firefox / Safari / Edge)
  • OS: Any (macOS / Linux / Windows)
  • Branch: main
  • Component: src/pages/HomePage.jsx
Impact

Medium - Feature works but has issues

Code of Conduct
  • I have joined the Discord server and will post updates there
  • I have searched existing issues to avoid duplicates
Vorherrschende Sprache
JavaScript
Sterne
53
Forks
187
Ø Merge
18 Min.
Gemergte PRs (30 T.)
2

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus AOSSIE-Org/OrgExplorer

Alle Issues in AOSSIE-Org/OrgExplorer

Ähnliche Issues

Weitere Issues zu JavaScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.