prompt-toolkit/python-prompt-toolkit

Mouse not working when running two dialogues in a sequence

Opened this issue · 0 comments

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()