Project

General

Profile

Actions

Bug #651

closed
MN RH

Cursor Not Auto-Focused in Drug Name Field When Prescription Opens

Bug #651: Cursor Not Auto-Focused in Drug Name Field When Prescription Opens

Added by Medha N. 15 days ago. Updated 7 days ago.

Status:
Closed
Priority:
Low
Target version:
Start date:
10/28/2026
Due date:
% Done:

0%

Estimated time:
Resolved By:

Description

Summary
When the Prescription section of a consultation opens, the cursor does not automatically land in the drug name/search text box. Typing immediately after opening Prescription does nothing — the doctor has to manually click into the field first before they can start typing a drug name.

Impact
This slows down prescribing on every single prescription, since a doctor’s natural habit of opening Prescription and typing the drug name right away goes nowhere until they notice, click into the field, and retype. Across many consultations a day, this adds up to real friction. There is also a secondary risk: if focus is left somewhere unexpected (such as the tab button itself) rather than nowhere at all, a stray keystroke (arrow keys, Enter, spacebar) could unintentionally trigger a different action instead of being safely ignored.

Environment
San Jose St. Bonaventure (nssh.test.clinq.health), OPD > Consultation > [patient visit] > Prescription tab. Verified live on 03 Nov 2026, patient Swathi (VIS-20261103-000002).

Steps to Reproduce

Open a consultation (used: Swathi, VIS-20261103-000002).
Click the Prescription tab. The panel shows “No prescriptions yet” and an “Add drug - type generic or brand...” search box at the bottom.
Without clicking anywhere, immediately type a drug name (e.g. “Para”). Nothing appears in the search box — the keystrokes go nowhere.
Click the “Add drug” box. It opens a “NEW PRESCRIPTION LINE” form with its own “Drug name *” field. Again, without clicking that field, typing immediately goes nowhere.
Manually click into the “Drug name” field and type — this works correctly and shows drug suggestions (e.g. typing “Para” shows Dolo 650, Paracetamol 500mg, etc.), confirming the field itself works fine and the only problem is that it isn’t focused automatically.

Expected vs Actual
Expected: When the Prescription panel opens (and/or when a new prescription line form opens), the cursor should automatically be placed in the drug name/search field so the doctor can start typing immediately without an extra click.

Actual: The cursor is not auto-focused in either the initial “Add drug” box or the “Drug name” field of a new prescription line. A manual click into the field is required every time before typing has any effect.

Notes
The drug name field itself works correctly once manually focused (suggestions appear as expected) — this is purely a missing autofocus, not a broken input or search.

RH Updated by Roshni Harish. 10 days ago Actions #1

  • Assignee set to Alminta V.

RH Updated by Roshni Harish. 10 days ago Actions #2

  • Subject changed from Cursor not in text box when prescription opens to Cursor Not Auto-Focused in Drug Name Field When Prescription Opens
  • Description updated (diff)
  • Target version set to Sprint 1

AV Updated by Alminta V. 7 days ago Actions #3

  • Status changed from New to Resolved
  • Assignee changed from Alminta V. to Roshni Harish.
  • Resolved By set to Alminta V.

RH Updated by Roshni Harish. 7 days ago Actions #4

  • Status changed from Resolved to Closed
Actions

Also available in: PDF Atom