What does /bugfix do?
Purpose: Investigate a JavaScript form that submits twice after reopening a modal.
This is a custom prompt convention, not a built-in or official ChatGPT slash command. Entering the slash text alone does not guarantee that ChatGPT will invoke a special tool. Use the complete structured prompt below or configure your own app to interpret this shortcut.
Key decision for this workflow
Count submit listeners across modal open/close cycles; compare click versus submit events; attach handlers once or clean them up.
Copy-ready task brief
Reusable prompt template
How to use this shortcut
- Collect the source inputs: Minimal reproduction, event-handler code, browser console output, and submission network trace.
- Run /bugfix with the copy-ready task brief above.
- Request the concrete output: A root-cause explanation, smallest safe patch, and regression test.
- Check the result: Count submit listeners across modal open/close cycles; compare click versus submit events; attach handlers once or clean them up.
Quality checks and limitations
Acceptance criteria: Count submit listeners across modal open/close cycles; compare click versus submit events; attach handlers once or clean them up. Limitation: Disabling the submit button may hide duplicate requests but does not repair duplicated event registration.
Related tools and learning
Continue with the 35 prompt generators, the technical AI Guides, and the Image Guides for deeper examples.
Worked example and expected output
Input materials: Minimal reproduction, event-handler code, browser console output, and submission network trace.
Requested result: A root-cause explanation, smallest safe patch, and regression test.
Acceptance test: Count submit listeners across modal open/close cycles; compare click versus submit events; attach handlers once or clean them up.
Field workflow: inputs, decisions, and validation
When to use this shortcut: Investigate a JavaScript form that submits twice after reopening a modal.
What to provide: Minimal reproduction, event-handler code, browser console output, and submission network trace.
What to request: A root-cause explanation, smallest safe patch, and regression test.
Practical method: Count submit listeners across modal open/close cycles; compare click versus submit events; attach handlers once or clean them up.
Important limitation: Disabling the submit button may hide duplicate requests but does not repair duplicated event registration.
Frequently asked questions
Is /bugfix an official ChatGPT command? No. It is a reusable custom shorthand from this catalog. Does it work without a plugin? You can copy the full prompt into an assistant; automatic slash-command routing requires application logic. Can the output be trusted without review? No. Review accuracy, safety, and suitability before use.
Worked scenario and review
Scenario: Diagnose a JavaScript form that submits twice after a modal reopens.
Expected deliverable: Describe reproduction steps, suspected duplicate listeners, a patch and a regression test.
Verification: Confirm the handler runs exactly once.