prompt-toolkit / prompt-toolkit/python-prompt-toolkit
Mouse not working when running two dialogues in a sequence
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 10.6k
- Forks
- 815
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
I am trying to create two dialogues in a sequence. The mouse works fine for the first dialogue, but it stops working in the second dialogue. I can select any option and press the buttons using the mouse in the first dialogue, but not in the second one. Keyboard bindings work in both dialogues.
Example code:
from prompt_toolkit.shortcuts import checkboxlist_dialog
checkboxlist_dialog(
title="Title 1",
text="Select one or more options using the Space bar. Use Tab to move focus to the buttons.",
values=[(choice, choice) for choice in ["Option 1", "Option 2", "Option 3"]],
default_values=["Option 1"]
).run()
checkboxlist_dialog(
title="Title 2",
text="Select one or more options using the Space bar. Use Tab to move focus to the buttons.",
values=[(choice, choice) for choice in ["Hey 1", "Hey 2", "Hey 3"]],
default_values=["Hey 1"]
).run()
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the checkboxlist_dialog entry point and the two sequential .run() calls shown in the report. Reproduce the example, then trace how mouse input is handled between the first and second dialogues; done means mouse selection and button presses work in both dialogues while keyboard bindings remain functional.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100